Ruby on Rails Saturday, January 21, 2012

On Sat, Jan 21, 2012 at 11:55 PM, Felipe Pieretti Umpierre <lists@ruby-forum.com> wrote:
felipe@Felipe:~/Downloads/rubygems-1.8.15$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
felipe@Felipe:~/Downloads/rubygems-1.8.15$ which ruby
/usr/local/bin/ruby
felipe@Felipe:~/Downloads/rubygems-1.8.15$ gem -v
1.8.15
felipe@Felipe:~/Downloads/rubygems-1.8.15$ which gem
/usr/local/bin/gem
felipe@Felipe:~/Downloads/rubygems-1.8.15$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

------------------------------------------------------------------------

felipe@Felipe:~/Downloads/rubygems-1.8.15$ rvm use system
Now using system ruby.

Ah, you actually do have rvm installed ... 

Did you already install some rubies ?

Anyway, this sequence should work then

peterv@ASUS:~$ rvm get stable

Original installed RVM version:

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]

Downloading RVM from wayneeseguin branch stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  799k  100  799k    0     0   337k      0  0:00:02  0:00:02 --:--:--  677k

Upgrading the RVM installation in /home/peterv/.rvm/
    RVM sourcing line found in: /home/peterv/.bashrc.

Upgrade Notes:

  * No new notes to display.

# RVM:  Shell scripts enabling management of multiple ruby environments.

# In case of any issues read output of 'rvm requirements' and/or 'rvm notes'

Upgrade of RVM in /home/peterv/.rvm/ is complete.

# Peter Vandenabeele,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne


Installed RVM stable version:

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]

RVM reloaded!

peterv@ASUS:~$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

peterv@ASUS:~$ which ruby
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby

peterv@ASUS:~$ gem -v
1.8.10

peterv@ASUS:~$ which gem
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/gem

peterv@ASUS:~$ echo $PATH
/home/peterv/.rvm/gems/ruby-1.9.3-p0/bin:/home/peterv/.rvm/gems/ruby-1.9.3-p0@global/bin:/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin:/home/peterv/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

peterv@ASUS:~$ rvm use 1.9.3 --default
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0

peterv@ASUS:~$ rvm list

rvm rubies

   jruby-1.6.4 [ i386 ]
   jruby-1.6.5.1-d19 [ i386 ]
   ruby-1.8.7-p352 [ i686 ]
   ruby-1.9.2-head [ i686 ]
   ruby-1.9.2-p290 [ i686 ]
   ruby-1.9.3-head [ i686 ]
=* ruby-1.9.3-p0 [ i686 ]
   ruby-1.9.3-rc1 [ i686 ]

# => - current
# =* - current && default
#  * - default

rvm gempeterv@ASUS:~$ rvm gemset create first_app
'first_app' gemset created (/home/peterv/.rvm/gems/ruby-1.9.3-p0@first_app).
peterv@ASUS:~$ rvm use 1.9.3@first_app
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0 with gemset first_app
peterv@ASUS:~$ gem list

*** LOCAL GEMS ***

bundler (1.0.21)
rake (0.9.2.2)

peterv@ASUS:~$ gem install rails
Fetching: i18n-0.6.0.gem (100%)
...
Fetching: json-1.6.5.gem (100%)
Building native extensions.  This could take a while...
...
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.0.gem (100%)
Fetching: rails-3.2.0.gem (100%)
Successfully installed i18n-0.6.0
...
Successfully installed rails-3.2.0
29 gems installed

peterv@ASUS:~$ rails help
Usage:
  rails new APP_PATH [options]
...

peterv@ASUS:~$ rails new first_app --skip-bundle
      create  
      create  README.rdoc
...
      create  vendor/plugins/.gitkeep

peterv@ASUS:~$ cd first_app/

peterv@ASUS:~/first_app$ echo "gem 'therubyracer'" >> Gemfile

peterv@ASUS:~/first_app$ bundle install
Fetching source index for https://rubygems.org/
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.0.4) 
Using activesupport (3.2.0) 
Using builder (3.0.0) 
Using activemodel (3.2.0) 
Using erubis (2.7.0) 
Using journey (1.0.0) 
Using rack (1.4.0) 
Using rack-cache (1.1) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.2) 
Using actionpack (3.2.0) 
Using mime-types (1.17.2) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.1) 
Using actionmailer (3.2.0) 
Using arel (3.0.0) 
Using tzinfo (0.3.31) 
Using activerecord (3.2.0) 
Using activeresource (3.2.0) 
Using bundler (1.0.21) 
Installing coffee-script-source (1.2.0) 
Installing execjs (1.3.0) 
Installing coffee-script (2.2.0) 
Using rack-ssl (1.3.2) 
Using json (1.6.5) 
Using rdoc (3.12) 
Using thor (0.14.6) 
Using railties (3.2.0) 
Installing coffee-rails (3.2.1) 
Installing jquery-rails (2.0.0) 
Installing libv8 (3.3.10.4) 
Using rails (3.2.0) 
Installing sass (3.1.12) 
Installing sass-rails (3.2.3) 
Installing sqlite3 (1.3.5) with native extensions 
Installing therubyracer (0.9.9) with native extensions 
Installing uglifier (1.2.2) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
peterv@ASUS:~/first_app$ rake environment  #This should not fail now
peterv@ASUS:~/first_app$ # go on from here ...

HTH,

Peter

--
Peter Vandenabeele
http://twitter.com/peter_v

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment