3

When I run foreman start i get the following error:

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$

i also did

sudo bundle install

again error: "An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue. Make sure that gem install eventmachine -v '0.12.10' succeeds before bundling. "

now when i do

sudo gem install eventmachine -v '0.12.10'

i again get error which says:

"ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension."

Please tell me what i'm missing.

Ben
  • 10,056
  • 5
  • 41
  • 42
PallavSharma
  • 439
  • 2
  • 12
  • 21

7 Answers7

7

In order to install eventmachine 1.0.3 on Ubuntu 14.04 you first need to run:

sudo apt-get install build-essential

then bundle install or gem install eventmachine

should be enough.

Note: If you have rbenv, remember to run rbenv rehash after a bundle install.

sargas
  • 5,820
  • 7
  • 50
  • 69
2

Try installing openssl and libstdc++.
If you are using rvm and have installed ruby in single user mode, you should omit sudo.

Can you paste the complete log of the error? Would be easier to answer your question with that.

UPDATE Please refer to this answer https://stackoverflow.com/a/17386686/846970 in another stackoverflow thread and let me know if it works.

Community
  • 1
  • 1
Anirudhan J
  • 2,072
  • 6
  • 27
  • 45
2

try gem install eventmachine -- --with-openssl-dir=/usr/local/opt/openssl@1.1

  • Thank you. For me it was: gem install eventmachine -- --with-openssl-dir=/opt/homebrew/Cellar/openssl\@1.1/1.1.1o/ – Tareq Saif Jun 16 '22 at 03:28
2

If you are on Mac M1/M2, try the following:

gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
mallet
  • 2,454
  • 3
  • 37
  • 64
0

You need to run bundle install you don't have one of the gems required in your Gemfile installed on your machine.

Austin Lin
  • 2,545
  • 17
  • 17
  • i did bundle install but now i get another error which says:"An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue. Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling. " – PallavSharma Dec 12 '13 at 05:40
  • and when i try doing `sudo gem install eventmachine -v '0.12.10'`it again prompt a new error which says "ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension." – PallavSharma Dec 12 '13 at 05:44
  • that could be the problem you can try running `gcc` on the command line it should prompt you to install the command line utils. – Austin Lin Dec 17 '13 at 19:59
0

Try to update your system RubyGems.

  1. rvm get stable
  2. rvm rubygems latest

I hope that works for you.

Akash Soti
  • 583
  • 2
  • 7
  • 13
0

For other people who cannot solve with the described above methods:

sudo -u gitlab -H bundle config build.eventmachine --with-cflags=\"-O2 -pipe -march=native -w\"
sudo -u gitlab -H bundle config build.thin --with-cflags=\"-O2 -pipe -march=native -w\"

As described by user enrico here.

valk
  • 9,363
  • 12
  • 59
  • 79