安装eventmachine gem时出错

Pal*_*rma 3 ruby gem rubygems ruby-on-rails ruby-on-rails-3

当我运行时,foreman start我得到以下错误:

pallav@pallav-System-Product-Name:~/Workspace/Aadvisor$ foreman start
10:04:32 web.1  | started with pid 11022 10:04:32 web.1  |
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in
`block in materialize': Could not find eventmachine-0.12.10 in any of
the sources (Bundler::GemNotFound) 10:04:32 web.1  |  from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in
`map!' 10:04:32 web.1  |  from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in
`materialize' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in
`specs' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in
`specs_for' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in
`requested_specs' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in
`requested_specs' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in
`setup' 10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
10:04:32 web.1  |   from
/var/lib/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in
`<top (required)>' 10:04:32 web.1  |  from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
10:04:32 web.1  |   from
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
10:04:32 web.1  | exited with code 1 10:04:32 system | sending SIGTERM
to all processes SIGTERM received
pallav@pallav-System-Product-Name:~/Workspace/Aadvisor$
Run Code Online (Sandbox Code Playgroud)

我也做到了

sudo bundle install
Run Code Online (Sandbox Code Playgroud)

再次出错:"安装eventmachine(0.12.10)时发生错误,Bundler无法继续.确保gem install eventmachine -v'0.12.10'在捆绑之前成功."

现在当我这样做

sudo gem install eventmachine -v '0.12.10'
Run Code Online (Sandbox Code Playgroud)

我再次得到错误,说:

"ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension."
Run Code Online (Sandbox Code Playgroud)

请告诉我我错过了什么.

sar*_*gas 5

要在Ubuntu 14.04上安装eventmachine 1.0.3,首先需要运行:

sudo apt-get install build-essential

然后bundle installgem install eventmachine

应该够了.

注意:如果你有rbenv,记得rbenv rehash在a之后运行bundle install.