Olá.
Segui esse tutorial:
http://cassiotalle.wordpress.com/2011/02/15/instaralar-ruby-1-9-2-rails-3-mysql-e-git-no-ubuntu/Com algumas diferenças:
Ao invés de digitar isso: bash < <( curl
http://rvm.beginrescueend.com/releases/rvm install-head )
Eu digitei isso: bash < <( curl
http://rvm.beginrescueend.com/releases/rvm-install-head )
Ao invés de digitar isso: rvm use 1.9.2 –default
Eu digitei isso: rvm use 1.9.2
Todos os passos que eu fiz diferente foi porque os do tutorial davam erro.
Ok, ambiente instalado, tudo rodando, uma maravilha, maaaaaaaaaaaaas...
Quando eu desligo o notebook e ligo ele, o ambiente desconfigura totalmente! Ele está ali, só consigo usar de cara, tenho que fazer o passo-a-passo novamente para ele 'Enxergar' o ambiente.
Exemplos:
rodrigo@NOMEDONOTE:~$ rvm install 1.9.2
Comando 'rvm' não encontrado, mas existem 20 similares
rvm: comando não encontrado
rodrigo@NOMEDONOTE:~$ sudo apt-get install git
[sudo] password for rodrigo:
Lendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
git já é a versão mais nova.
Os seguintes pacotes foram instalados automaticamente e já não são necessários:
linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' para removê-los.
0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
O mesmo acontece com o Curl.
rodrigo@NOMEDONOTE:~$ bash < <(curl http://www.rvm.beginrescueend.com/releases/rvm-install-head)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 728 100 728 0 0 447 0 0:00:01 0:00:01 --:--:-- 1639
bash: linha 1: erro de sintaxe próximo do `token' não esperado `newline'
bash: linha 1: `<!DOCTYPE html>'
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [[-s $HOME/.rvm/scripts/rvm ]] ; then source
$HOME/.rvm/scripts/rvm ; fi
rodrigo@NOMEDONOTE:~$ sudo apt-get install build-essential bison openssl libreadline5 libreadline5-dev curl git-core zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libmysqlclient-dev
Lendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
bison já é a versão mais nova.
build-essential já é a versão mais nova.
curl já é a versão mais nova.
libreadline5 já é a versão mais nova.
libreadline5-dev já é a versão mais nova.
zlib1g já é a versão mais nova.
zlib1g-dev já é a versão mais nova.
git-core já é a versão mais nova.
libmysqlclient-dev já é a versão mais nova.
libsqlite3-0 já é a versão mais nova.
libsqlite3-dev já é a versão mais nova.
libssl-dev já é a versão mais nova.
libxml2-dev já é a versão mais nova.
openssl já é a versão mais nova.
sqlite3 já é a versão mais nova.
Os seguintes pacotes foram instalados automaticamente e já não são necessários:
linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' para removê-los.
0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
rodrigo@NOMEDONOTE:~$ rvm install 1.9.2
Installing Ruby from source to: /home/rodrigo/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...
ruby-1.9.2-p180 - #fetching
ruby-1.9.2-p180 - #extracted to /home/rodrigo/.rvm/src/ruby-1.9.2-p180 (already extracted)
ruby-1.9.2-p180 - #configuring
ruby-1.9.2-p180 - #compiling
ruby-1.9.2-p180 - #installing
ruby-1.9.2-p180 - Updating #rubygems to the latest.
Removing old Rubygems files...
Installing rubygems dedicated to ruby-1.9.2-p180...
Installing rubygems for /home/rodrigo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Installation of rubygems completed successfully.
ruby-1.9.2-p180 - Updating #rubygems to the latest.
Removing old Rubygems files...
Installing rubygems dedicated to ruby-1.9.2-p180...
Installing rubygems for /home/rodrigo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Installation of rubygems completed successfully.
ruby-1.9.2-p180 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.2-p180 - #importing default gemsets (/home/rodrigo/.rvm/gemsets/)
Install of ruby-1.9.2-p180 - #complete
rodrigo@NOMEDONOTE:~$ rvm use 1.9.2
Using /home/rodrigo/.rvm/gems/ruby-1.9.2-p180
rodrigo@NOMEDONOTE:~$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
rodrigo@NOMEDONOTE:~$ gem list
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.5)
actionpack (3.0.5)
activemodel (3.0.5)
activerecord (3.0.5)
activeresource (3.0.5)
activesupport (3.0.5)
arel (2.0.9)
builder (2.1.2)
bundler (1.0.10)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
[b]mysql2 (0.2.6)[/b]
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.13)
rack-test (0.5.7)
[b]rails (3.0.5)[/b]
railties (3.0.5)
rake (0.8.7)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)
rodrigo@NOMEDONOTE:~$ sudo apt-get install mysql-client mysql-server
[sudo] password for rodrigo:
Lendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
mysql-client já é a versão mais nova.
mysql-server já é a versão mais nova.
Os seguintes pacotes foram instalados automaticamente e já não são necessários:
linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' para removê-los.
0 pacotes atualizados, 0 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
Gostaria de entender o porquê disso estar acontecendo.
Atenciosamente.