开发者

How do I get Heroku to work on Ubuntu 10.10 (using VirtualBox on Windows machine)?

I'm a newbie following the RailsTutorial.org program and have installed/setup rvm, ruby 1.9.2,rails, curl, git and created my first app and pushed it to github (so the SSH key is fine).

The next step is deploying to Heroku, which is killing me:

gem install Heroku

works fine but I get this error after "heroku keys:add" or "heroku create":

    [app_first (master)]$ heroku keys:add
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- readline (LoadError)
 from <internal:lib/rubygems/custom_require>:29:in `require'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.11.0/lib/heroku/commands/app.rb:1:in `<top (required)>'
 from <internal:lib/rubygems/custom_require>:29:in `require'
 from <internal:lib/rubygems/custom_require>:29:in `require'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.11.0/lib/heroku/command.rb:5:in `block in <top (required)>'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.11.0/lib/heroku/command.rb:5:in `each'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.11.0/lib/heroku/command.rb:5:in `<top (required)>'
 from <internal:lib/rubygems/custom_require>:29:in `require'
 from <internal:lib/rubygems/c开发者_运维百科ustom_require>:29:in `require'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/heroku-1.11.0/bin/heroku:7:in `<top (required)>'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `load'
 from /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin/heroku:19:in `<main>

My guess is it's something to do with missing or misplaced gems, but I'm a total rookie so the guess may be way off. here's the gem environment:

[app_first (master)]$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
  - INSTALLATION DIRECTORY: /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
  - RUBY EXECUTABLE: /home/john/.rvm/rubies/ruby-1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/john/.rvm/gems/ruby-1.9.2-p0@rails3tutorial
     - /home/john/.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/

Any ideas? Grateful in advance.


Got it! Or rather, a buddy got it for me. Here's a link to the solution.


Hey.. I completed the Installation process with rvm, ruby 1.9.2 and sqlite3. You gave up in the last step :) :)

Alright my solution.. this worked for me after 2 days of wrestling with heroku :)

sudo apt-get install libreadline-dev

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

and then build the extension

ruby extconf.rb && make  && make install


gem install rb-readline 

solved it for me.

source: https://gist.github.com/1080765


Thanks to Prozac! I have done a multi-user install of RVM on Ubuntu 11.10 The following worked for me, using ruby 1.9.2:

sudo apt-get install libreadline-dev

cd /usr/local/rvm/src/ruby-1.9.2-p290/ext/readline/

ruby extconf.rb && make && make install


The herkou documentation is awesome. These are the instructions that you want on the heroku docs


upgrading from ruby-1.9.2-p180 to ruby-1.9.2-p290 did it for me

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜