Screencast: How to Install Ruby on Rails on Ubuntu?

This screencast will teach you to set up the Ruby on Rails development environment on Ubuntu. Don’t forget to toggle the full screen button on the player. Photo credit: k40s
This entry was posted in Screencasts and tagged , , , , . Bookmark the permalink.

About me

Hello, there! I'm Aslam Najeebdeen, a web craftsman, a visionary, a Rubyist, Co founder of Feedgen and founder of FrontCube
  • Pingback: How to Install Ruby on Rails on Ubuntu 9.04 (Jaunty Jackalope)

  • Danial

    I am a rank newbie and I was looking for this exact information.

    Awesome! and Thanks!!

  • Danial

    I am a rank newbie and I was looking for this exact information.

    Awesome! and Thanks!!

  • http://beansjar.blogspot.com änthräX

    an excellent guide. got to know your blog from Gaveen . nice work mate. keep it up. and hey, do you mind if i put a link to your post in my blog?

    • http://mohamedaslam.com Aslam

      I won’t mind. You can link to any post! :)

  • http://beansjar.blogspot.com änthräX

    an excellent guide. got to know your blog from Gaveen . nice work mate. keep it up. and hey, do you mind if i put a link to your post in my blog?

    • http://mohamedaslam.com Aslam

      I won’t mind. You can link to any post! :)

  • http://blog.shaakunthala.com ශාකුන්තල

    Excellent work Aslam, I came to know about this site via änthräX blog. Keep up good work. :)

    It’s better if you could increase audio volume level in your next screencasts. My laptop can’t produce much sound, and I can’t hear you clearly.

    I have a one question also. Why does the following command take a longer time (more than apt-get or yum) to execute?
    sudo gem install rails

    Thank you very much for this screencast.
    (I’m totally new to ruby)

    • http://mohamedaslam.com Aslam

      Thank you for your feedback Shaakunthala!

      Yeah, I agree. I’ll increase the volume in upcomming screencasts. Also I would like to give the original high quality video to download very soon.
      I hope you can hear clearly in the original video. :)

      The answer to your question is,

      apt-get and yum will install bunch of file one by one like a queue and displays the downloading file and the state in terminal.

      But in the case of Rails installation, you are actually installing different 7 number of gems, rake, activesupport, activerecord and so on. You need all these gems to create and run Rails apps. During the Rails installation process you can see, it’ll only prompt when a gem successfully installed.Unlike apt-get and yum it wont show downloading files one by one. So, It looks like long process.

      Welcome to the Ruby word! :)

  • http://blog.shaakunthala.com ශාකුන්තල

    Excellent work Aslam, I came to know about this site via änthräX blog. Keep up good work. :)

    It’s better if you could increase audio volume level in your next screencasts. My laptop can’t produce much sound, and I can’t hear you clearly.

    I have a one question also. Why does the following command take a longer time (more than apt-get or yum) to execute?
    sudo gem install rails

    Thank you very much for this screencast.
    (I’m totally new to ruby)

    • http://mohamedaslam.com Aslam

      Thank you for your feedback Shaakunthala!

      Yeah, I agree. I’ll increase the volume in upcomming screencasts. Also I would like to give the original high quality video to download very soon.
      I hope you can hear clearly in the original video. :)

      The answer to your question is,

      apt-get and yum will install bunch of file one by one like a queue and displays the downloading file and the state in terminal.

      But in the case of Rails installation, you are actually installing different 7 number of gems, rake, activesupport, activerecord and so on. You need all these gems to create and run Rails apps. During the Rails installation process you can see, it’ll only prompt when a gem successfully installed.Unlike apt-get and yum it wont show downloading files one by one. So, It looks like long process.

      Welcome to the Ruby word! :)

      • http://dunithd.wordpress.com Dunith Dhanushka

        Great job Aslam!.. It totally worked for me. I was trying to develop a Ruby client for Apache ActiveMq broker. This was really helpful to me…

  • http://blog.shaakunthala.com ශාකුන්තල

    Thanks again for your explanation. :)

  • http://blog.shaakunthala.com ශාකුන්තල

    Thanks again for your explanation. :)

  • http://gaveen.owain.org Gaveen

    @Shaakunthala:
    You can add –no-ri and –no-rdoc to avoid installing the online documentation for the gems. But this is not recommended if you plan to defer to the documentation. (ri and rdoc are similar to man pages and javadoc). Avoiding them however speeds up the gem installation.
    Eg: sudo gem install –no-ri –no-rdoc rails

  • http://gaveen.owain.org Gaveen

    @Shaakunthala:
    You can add –no-ri and –no-rdoc to avoid installing the online documentation for the gems. But this is not recommended if you plan to defer to the documentation. (ri and rdoc are similar to man pages and javadoc). Avoiding them however speeds up the gem installation.
    Eg: sudo gem install –no-ri –no-rdoc rails

  • http://gaveen.owain.org Gaveen

    Corrections to my last comment, sorry.

    1. I meant “refer the documentation” not “defer to the”. :)
    2. And the characters before the no-ri and no-rdoc options are double dashes (- -) without a space in between. It might not be obvious in the comment.

  • http://gaveen.owain.org Gaveen

    Corrections to my last comment, sorry.

    1. I meant “refer the documentation” not “defer to the”. :)
    2. And the characters before the no-ri and no-rdoc options are double dashes (- -) without a space in between. It might not be obvious in the comment.

    • James

      I went through everything on the screencast just fine, until I went to install rails, and got this message:

      /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `require’: no such file to load — zlib (LoadError)
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `require’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in `require’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in `’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:3:in `require’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:3:in `’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:4:in `require’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:4:in `’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:167:in `require’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:167:in `rescue in load_and_instantiate’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:159:in `load_and_instantiate’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:88:in `[]‘
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:144:in `find_command’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:131:in `process_args’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:102:in `run’
      from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in `run’
      from /usr/local/bin/gem:21:in `’

      Any ideas? I’ve looked all over and tried lots of stuff but nothing seems to work.
      Thanks,
      James

      • http://mohamedaslam.com Aslam

        @James
        Seems that your Ruby interpreter cannot understand the ‘require’ keyword. This may happen if your installation failed before the completion.
        Remove Ruby totally from your computer and then do a fresh installation. Make sure your internet connection during the installation.

  • Sharief Shaik

    Nice post. Iam new to ubuntu(Linux) and your screencast eased my way for my setting up the RoR environment.

  • Sharief Shaik

    Nice post. Iam new to ubuntu(Linux) and your screencast eased my way for my setting up the RoR environment.

  • James

    I went through everything on the screencast just fine, until I went to install rails, and got this message:

    /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `require’: no such file to load — zlib (LoadError)
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `require’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in `’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in `require’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in `’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:3:in `require’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:3:in `’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:4:in `require’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:4:in `’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:167:in `require’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:167:in `rescue in load_and_instantiate’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:159:in `load_and_instantiate’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:88:in `[]‘
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:144:in `find_command’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:131:in `process_args’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:102:in `run’
    from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in `run’
    from /usr/local/bin/gem:21:in `’

    Any ideas? I’ve looked all over and tried lots of stuff but nothing seems to work.
    Thanks,
    James

    • http://mohamedaslam.com Aslam

      @James
      Seems that your Ruby interpreter cannot understand the ‘require’ keyword. This may happen if your installation failed before the completion.
      Remove Ruby totally from your computer and then do a fresh installation. Make sure your internet connection during the installation.

  • http://dunithd.wordpress.com Dunith Dhanushka

    Great job Aslam!.. It totally worked for me. I was trying to develop a Ruby client for Apache ActiveMq broker. This was really helpful to me…

  • Indika

    Great screencast.
    Got everything up and running.

    Thanks

  • Indika

    Great screencast.
    Got everything up and running.

    Thanks

  • Thangaraj

    Good job Aslam. It worked for me. Thanks for the screencast

  • Thangaraj

    Good job Aslam. It worked for me. Thanks for the screencast

  • vadkant

    this video was EXTREMELY helpful, you are the hero of my day! :) very good job, my lord!
    im waiting for your further videos! ;)
    good luck Aslam!

  • vadkant

    this video was EXTREMELY helpful, you are the hero of my day! :) very good job, my lord!
    im waiting for your further videos! ;)
    good luck Aslam!

  • Eric

    Very helpful screencast! Your instructions worked perfectly for me on Ubuntu 10.04 LTS. Thank you

    • http://mohamedaslam.com Aslam

      Hey Eric.

      Glad the screencast helped you with the installation. I’m planning to do a new screencast on Ruby on Rails installation with RVM on Ubuntu.

      Stay tuend.

  • Eric

    Very helpful screencast! Your instructions worked perfectly for me on Ubuntu 10.04 LTS. Thank you

  • http://mohamedaslam.com Aslam

    Hey Eric.

    Glad the screencast helped you with the installation. I'm planning to do a new screencast on Ruby on Rails installation with RVM on Ubuntu.

    Stay tuend.

  • Eric

    Sounds great, Aslam! Thanks again

  • Eric

    Sounds great, Aslam! Thanks again

  • http://twitter.com/kabirmd Kabir Mohammed

    Great work Aslam. finally got it running! It is “rails server” for me ubuntu 10.04 rather than ./script/server to run the application otherwise everything is 100% spot on. Thanks.

    • http://mohamedaslam.com Aslam

      Hello Kabir,
      Thanks for the comment.

      If you follow the instruction above, now it’ll install Rails 3.0 rather than Rails 2.3.x
      That’s why you need to use “rails server” instead of “./script/server”

      I hope to write a new guide for Rails 3.0 stay tuned.

  • http://twitter.com/kabirmd Kabir Mohammed

    Great work Aslam. finally got it running! It is “rails server” for me ubuntu 10.04 rather than ./script/server to run the application otherwise everything is 100% spot on. Thanks.

  • http://mohamedaslam.com Aslam

    Hello Kabir,
    Thanks for the comment.

    If you follow the instruction above, now it'll install Rails 3.0 rather than Rails 2.3.x
    That's why you need to use “rails server” instead of “./script/server”

    I hope to write a new guide for Rails 3.0 stay tuned.

  • MAXOR

    http://anthr6x.blogspot.com/2009/08/introduction.html
    but you can’t read because it is written by sinhala.(Local Language of SRI LANKA)
    an änthräX wrote excellent getting started for ruby by sinhala