"An error occurred while installing eventmachine" with version 1.0.8 - ruby-on-rails

Can someone help me to solve this problem:
An error occurred while installing eventmachine (1.0.8), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.8'` succeeds before bundling.
It comes after I do: "bundle install" in my environment.
Thanks!

Create a reference for the OpenSSl gem was the key. I did something like this:
gem install eventmachine -v '1.0.8' -- --with-cppflags=-I/usr/local/opt/openssl/include
and finally worked for me.
Thanks #Jack and #Jww for his help.

Related

How to fix this error "gem install bootsnap -v '1.4.4'?

I am a newbie and using Ruby on Rails, I am stucking with this problem. I am trying to make a new project in Ruby on Rails, and when I used this "rails new -X", it gave me this message "an error occurred while installing bootsnap (1.4.4) and Bundler cannot continue. Make sure that 'gem install bootsnap -v '1.4.4' --source 'https:rubygems.org/'' succeeds before bundling"
Then I tried the command 'gem install bootsnap -v '1.4.4' --source 'https:rubygems.org/'' , it gave me this message : " ERROR: While executing gem ... (NoMethodError) undefined method 'downcase' for nil:NilClass"
I tried to find something from this website "https://rubygems.org/gems/bootsnap/versions/1.4.4-java" and installed it, but nothing changed.
My gem version is 2.5.2
I know my question is just a little bit stupid but could you please help me? Thank you very much.
You're getting this error " ERROR: While executing gem ... (NoMethodError) undefined method 'downcase' for nil:NilClass" because, you mentioned wrong source path.
Replace this
gem install bootsnap -v '1.4.4' --source https:rubygems.org/
with this:
gem install bootsnap -v '1.4.4' --source https://rubygems.org/

Failure to bundle install on Rails

I run into this error while trying to run bundle install.
An error occurred while installing nokogiri (1.6.8.1), and Bundler
cannot continue.
Make sure that gem install nokogiri -v '1.6.8.1' succeeds before bundling.
Could someone help me plse? thanks
It seems to me that this issues is similar to the one discussed in the following link:
Running "bundle install" fails and asks me to run "bundle install"

Why does 'bundle install' fail and force me to 'gem install' myself?

I have executed the command
bundle install
In my Ruby on Rails projects, and I get the following error message
An error occurred while installing bcrypt (3.1.10), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.10'` succeeds before bundling.
After executing
gem install bcrypt -v '3.1.10'
the problem disappears. My question is why it's necessary sometimes to install some gems in a direct way?

RubyOnRails- How to bundle?

I am trying to install all dependencies via following command:
bundle install
It gave me following error:
An error occurred while installing libv8 <3.16.14.13>, and bundle cannot continue.
Make sure that 'gem install libv8 -v '3.16.14.13' ' succeeds before bundling.
Then from this link:
Error installing libv8: ERROR: Failed to build gem native extension
I found this solution:
gem install libv8 -v '3.16.14.13' -- --with-system-v8
It then installed the libv8
Then again I ran the command:
bundle install
Now its giving me following error:
An error occurred while installing therubyracer <0.12.2>, and bundler cannot continue.
Make sure that 'gem install therubyracer -v '0.12.2' ' succeeds before bundling.
I tried deleting therubyracer from gem file and then run the command but i am getting the same error.
Please guide me.
Thanx
I see that you are using Windows 7 , then prepare yourself:
Unfortunately, there's no know way of installing that gem on Windows:
Linked question: therubyracer not installing on Windows
This is one of many things that made me change to Linux.
EDIT
There is a workaround but its from 4 years ago so , I hope this will work:
https://github.com/eakmotion/therubyracer_for_windows
EDIT 2 - About middleman
Did you install the DevKit for RubyInstaller?.
Here you have the documentation of the gem with the installation steps:
https://github.com/middleman/middleman
EDIT 3
Check this one. There are others with the same issue (of course) and they managed to "solved" it using it:
https://github.com/jawwadzafar/middleman-boilerplate

Bundler cant read autoprefixer-rails-6.0.3.gem

Bundler is throwing an error could not read the gem & that it may be corrupted.
Bundler::GemspecError: Could not read gem at /home/pragadeesh/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/autoprefixer-rails-6.0.3.gem. It may be corrupted.
An error occurred while installing autoprefixer-rails (6.0.3), and Bundler cannot continue.
Make sure that `gem install autoprefixer-rails -v '6.0.3'` succeeds before bundling.
i dont know how to resolve this problem ? please help me out.
Try this:
$ rm -f /home/pragadeesh/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/cache/autoprefixer-rails-6.0.3.gem
$ gem install autoprefixer-rails

Resources