Sunday, April 24, 2011

Installing Rails on Ubuntu

Installed Rails (3.0) on my Ubuntu (10.10).

1. Since my Ubuntu has multiple versions of Ruby installed, I make sure first that I am using Ruby 1.9.2 with recently installed rvm.
$ rvm use 1.9.2
Using /home/socrateos/.rvm/gems/ruby-1.9.2-p180

2. Install Rails.
$ gem install rails
Successfully installed activesupport-3.0.7
Successfully installed builder-2.1.2
Successfully installed i18n-0.5.0
Successfully installed activemodel-3.0.7
Successfully installed rack-1.2.2
Successfully installed rack-test-0.5.7
Successfully installed rack-mount-0.6.14
Successfully installed tzinfo-0.3.26
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.7
Successfully installed arel-2.0.9
Successfully installed activerecord-3.0.7
Successfully installed activeresource-3.0.7
Successfully installed mime-types-1.16
Successfully installed polyglot-0.3.1
Successfully installed treetop-1.4.9
Successfully installed mail-2.2.17
Successfully installed actionmailer-3.0.7
Successfully installed thor-0.14.6
Successfully installed railties-3.0.7
Successfully installed bundler-1.0.12
Successfully installed rails-3.0.7
23 gems installed
Installing ri documentation for activesupport-3.0.7...
Installing ri documentation for builder-2.1.2...
Installing ri documentation for i18n-0.5.0...
Installing ri documentation for activemodel-3.0.7...
Installing ri documentation for rack-1.2.2...
Installing ri documentation for rack-test-0.5.7...
Installing ri documentation for rack-mount-0.6.14...
Installing ri documentation for tzinfo-0.3.26...
Installing ri documentation for abstract-1.0.0...
Installing ri documentation for erubis-2.6.6...
Installing ri documentation for actionpack-3.0.7...
Installing ri documentation for arel-2.0.9...
Installing ri documentation for activerecord-3.0.7...
Installing ri documentation for activeresource-3.0.7...
Installing ri documentation for mime-types-1.16...
Installing ri documentation for polyglot-0.3.1...
Installing ri documentation for treetop-1.4.9...
Installing ri documentation for mail-2.2.17...
Installing ri documentation for actionmailer-3.0.7...
Installing ri documentation for thor-0.14.6...
Installing ri documentation for railties-3.0.7...
Installing ri documentation for bundler-1.0.12...
Installing ri documentation for rails-3.0.7...
Installing RDoc documentation for activesupport-3.0.7...
Installing RDoc documentation for builder-2.1.2...
Installing RDoc documentation for i18n-0.5.0...
Installing RDoc documentation for activemodel-3.0.7...
Installing RDoc documentation for rack-1.2.2...
Installing RDoc documentation for rack-test-0.5.7...
Installing RDoc documentation for rack-mount-0.6.14...
Installing RDoc documentation for tzinfo-0.3.26...
Installing RDoc documentation for abstract-1.0.0...
Installing RDoc documentation for erubis-2.6.6...
Installing RDoc documentation for actionpack-3.0.7...
Installing RDoc documentation for arel-2.0.9...
Installing RDoc documentation for activerecord-3.0.7...
Installing RDoc documentation for activeresource-3.0.7...
Installing RDoc documentation for mime-types-1.16...
Installing RDoc documentation for polyglot-0.3.1...
Installing RDoc documentation for treetop-1.4.9...
Installing RDoc documentation for mail-2.2.17...
Installing RDoc documentation for actionmailer-3.0.7...
Installing RDoc documentation for thor-0.14.6...
Installing RDoc documentation for railties-3.0.7...
Installing RDoc documentation for bundler-1.0.12...
Installing RDoc documentation for rails-3.0.7...

3. Let's see what I got.
$ rails -v
Rails 3.0.7

$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
activesupport (3.0.7)
arel (2.0.9)
builder (2.1.2)
bundler (1.0.12)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.17)
mime-types (1.16)
pg (0.11.0)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.7)
railties (3.0.7)
rake (0.8.7)
sequel (3.22.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.26)


4. Create a test app.
$ cd ~/work/ruby/rails/
$ rails new app01
      create  
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  log
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  public/images
      create  public/images/rails.png
      create  public/stylesheets
      create  public/stylesheets/.gitkeep
      create  public/javascripts
      create  public/javascripts/application.js
      create  public/javascripts/controls.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/effects.js
      create  public/javascripts/prototype.js
      create  public/javascripts/rails.js
      create  script
      create  script/rails
      create  test
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  test/unit
      create  tmp
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  vendor/plugins
      create  vendor/plugins/.gitkeep

4. Run.
$ cd app01
$ rails server
=> Booting WEBrick
=> Rails 3.0.7 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-04-24 10:51:41] INFO  WEBrick 1.3.1
[2011-04-24 10:51:41] INFO  ruby 1.9.2 (2011-02-18) [i686-linux]
[2011-04-24 10:51:41] INFO  WEBrick::HTTPServer#start: pid=15464 port=3000

5. Result.

No comments:

Post a Comment