views:

398

answers:

3

I'm following the Ruby on Rails tutorial at http://railstutorial.org/chapters/beginning#sec:1.4.1, and all is going well until I tried to get my app going on Heroku.

I installed heroku, that worked fine, but now when I run heroku keys:add or any other heroku command, I get the following error:

/home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:9:in `rescue in <top (required)>': 
no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/restclient.rb:5:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rest-client-1.4.2/lib/rest_client.rb:2:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/lib/heroku/client.rb:2:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/lib/heroku.rb:3:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.9.14/bin/heroku:6:in `<top (required)>'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `load'
        from /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `<main>'

I did what the error message said, and installed libopenssl-ruby, but heroku still didn't work.

I've done a search and found the following two pages which try to combat the heroku errors: http://www.mail-archive.com/[email protected]/msg05001.html http://blog.project-sierra.de/archives/1534

I followed the instructions on these pages (which are the same), but heroku still doesn't work.

I usually do my work on windows, so everything is a bit new to me on ubuntu. Here's my ruby environment:

 RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
  - INSTALLATION DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
  - RUBY EXECUTABLE: /home/sirswap/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/sirswap/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
     - /home/sirswap/.rvm/gems/ruby-1.9.2-p0@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I'm running ubuntu 10.04.

Any help or advice for next steps would be much appreciated :)

+1  A: 

Read my directions on how to install RVM on Linux. You need to install libssl-dev or things like net/https won't work. It's OK though, just install that and recompile your rubies.

AboutRuby
Thanks, I just had this problem and installing libssl-dev and running extconf.rb fixed it
Lobe
A: 

In your case "recompiling your rubies" can probably be done by issuing:

rvm install  

Or alternatively you might make some progress by manually recompiling the openssl extension:

cd /home/sirswap/.rvm/src/ruby-1.9.2-p0/ext/openssl
ruby extconf.rb  
make  
make install  
stissing
A: 

Hey :) Don't know if it's still relevant or whether this will work for you as well.. it did for me.

Had the exact same problem..

I also noticed when doing
$ rails console

I was getting errors which indicated I had problems with Readline.

Following http://rvm.beginrescueend.com/packages/readline/ helped me fix all issues I was experiencing.

einat