Heroku, Rails 3, RVM and Ubuntu

Today I tried to use Heroku on Ubuntu / RVM for a Rails 3 test app. I ran into a similar problem like I had yesterday with OpenSSL.

After installing the Heroku gem:

gem install heroku

and running the command for create a new app

heroku create

I got this error

/home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- readline (LoadError)
	from /home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/gems/heroku-1.9.10/lib/heroku/commands/app.rb:1
	from /home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/gems/heroku-1.9.10/lib/heroku/command.rb:5
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/gems/heroku-1.9.10/lib/heroku/command.rb:5:in `each'
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/gems/heroku-1.9.10/lib/heroku/command.rb:5
	from /home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
	from /home/siebel/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/gems/heroku-1.9.10/bin/heroku:7
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/bin/heroku:19:in `load'
	from /home/siebel/.rvm/gems/ruby-1.8.7-p249/bin/heroku:19

Now, the first line looks darn familiar and so does the solution:

First install libreadline-dev:

sudo apt-get install libreadline-dev

Then cd into

~/.rvm/src/ruby-1.8.7-p249/ext/readline

and build the extension:

ruby extconf.rb
make
make install

That’s it… heroku should run after that without problems.

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
This entry was posted in RubyOnRails. Bookmark the permalink.

26 Responses to Heroku, Rails 3, RVM and Ubuntu

  1. Billy says:


    It’s very useful for me. Thanks!

  2. jamil says:


    Helped a lot! Much better than “rvm remove” then having to recompile with “rvm install”!

  3. lynx says:


    Thank you good man!

  4. maxidr says:


    Thank you very much!!! very useful, especially the readline problem

  5. Claudio says:


    Muchas Gracias!!!!!!

  6. Pingback: Ruby On Rails… in the beginning

  7. Pingback: RVM and Ubuntu | simmo.gs

  8. Tony Davis says:


    Thanks a million – I found this after a couple of hours of vain searching, and it worked like a charm.

  9. ranska says:


    Merci beaucoup

  10. Charles Sun says:


    Thanks a bunch! The solution worked like a charm on my PC too.

    This is really a great blog!

  11. Idris says:


    Thx, it helps me :)

  12. Jib says:


    Thanks, exactly what I needed

  13. Wes says:


    Thank you!!!

  14. Mondongo says:


    Thanks! Solved my issue.

  15. Tapan says:


    Thanx ….for resolving my problem and saving my time :)

  16. Ankur says:


    thanks so much!

  17. Roza says:


    Hi man,
    thanks for your post
    I found and really was useful for me
    A lot of thanks
    btw I am learning RoR

  18. nobody says:


    THANK YOU!!!!!!!!

  19. cochise says:


    Stefan,
    thank you very much for your post. It found exactly the same problem with version 1.9.2 and your solution worked as clock

  20. kevin says:


    thanks buddy.
    you save my life :)

  21. Kersten says:


    It works!

    Thanks a lot!

  22. Kyle says:


    Thanks, this helped me out!

  23. Eric says:


    Thanks! Worked perfectly

  24. kannan says:


    WOW thanks you saved me my time.


  25. Wow, it worked like charm. Thanks I had trouble with heroku getting work with ruby1.9.2-p180 now at least I got logged into heroku.

    Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>