When running the rails server i am getting "An error occurred while installing escape_utils (1.2.1), and Bundler cannot continue. Make sure that gem install escape_utils -v '1.2.1' succeeds before bundling". But after that when i run bundle install, i have received the following error " error occurred while installing escape_utils (1.2.1), and Bundler cannot continue. Make sure that gem install escape_utils -v '1.2.1' succeeds before bundling".
Could anyone guide me how to fix this?
You need to run gem install escape_utils -v '1.2.1' to install the gem without using bundler. It will probably fail and the trace that it prints will tell you what's happening and where to find the error log file for more info on what's missing.
That gem has native extensions that it needs to compile, if it gives you an error while compiling them, you probably have a missing system dependency.
Related
When I download the rails application from github
https://github.com/ari/jobsworth
An then give bundle install it throws error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
An error occurred while installing mysql2 (0.4.4), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.4'` succeeds before bundling.
After I give the sudo gem install mysql2 -v '0.4.4' and it displays like:
Fetching: mysql2-0.4.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/usr/bin/ruby2.4 -r ./siteconf20180212-10708-v1q8lj.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.4.0/gems/mysql2-0.4.4 for inspection.
Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/mysql2-0.4.4/gem_make.out
After run bundle install it throws same error.
Running these commands worked for me.
brew install openssl
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
bundle
You can refer to this link for further help https://github.com/brianmario/mysql2/issues/1005
I got stuck in a dead end after trying to install the gem 'thin' on the environment
RHEL 6.0
Ruby 1.9.3
Rails 3.2.8
As indicated, I added
gem 'thin'
to my Gemfile and ran
bundle install
The installation seemed to be successful, but after that, whenever I run 'gem', I get
<internal:prelude>:8:in `lock': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
ERROR: Failed to build gem native extension.
deadlock; recursive locking
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1-static/eventmachine-1.0.3/gem_make.out
While if I run again 'bundle install' I get
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at
http://bit.ly/bundler-issues. Thanks!
<internal:prelude>:8:in `lock': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
ERROR: Failed to build gem native extension.
deadlock; recursive locking
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1-static/eventmachine-1.0.3/gem_make.out
I even tried to follow troubleshooting at https://github.com/bundler/bundler/blob/master/ISSUES.md but nothing has changed.
Looks like there's something corrupted in the eventmachine gem installation, but I can't neither uninstall or reinstall it.
Has anybody got an idea?
I would like at least to be able to revert to the (working) configuration prior to thin installation....
Same Question I think : Rails-Unicorn-Install-Error-KGIO
While running bundle install, system is giving error for installing gems.
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/kgio-2.8.0 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/kgio-2.8.
0/ext/kgio/gem_make.out
An error occurred while installing kgio (2.8.0), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.0'` succeeds before bundling.
Here I am unable to install kgio gem. I tried a lot but no success. Is there any way to come out of this.
Thanks in advance.
Removed the Unicorn gem from gem list.
gem 'unicorn'
If you are running Windows 7:
Error Installing "kgio-2.9.2" Gem on Windows
platforms :ruby do
gem 'unicorn'
end
When I run
abhay$ gem install capybara-webkit
I get the following error messages.
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
/Users/abhay/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
Gem files will remain installed in /Users/abhay/.rvm/gems/ruby-1.9.2-p180/gems/capybara- webkit-0.12.1 for inspection.
Results logged to /Users/abhay/.rvm/gems/ruby-1.9.2-p180/gems/capybara-webkit-0.12.1/./gem_make.out
I had to install QT link as capybara-webkit gem uses it to compile and install.
This sounds a lot like a duplicate of this https://stackoverflow.com/a/11622193
I found the solutions in this answer worked well:
https://stackoverflow.com/a/11622193/3088748
Hi i am getting a gem exception error:
Gem::Exception: Cannot load gem at [/usr/lib/ruby/gems/1.8/cache/Ascii85-1.0.1.gem] in /home/profweb/rails-apps/profitnext/releases/20120628123949
** [out :: profitnext.com] An error occured while installing Ascii85 (1.0.1), and Bundler cannot continue.
** [out :: profitnext.com] Make sure that `gem install Ascii85 -v '1.0.1'` succeeds before bundling.
command finished in 607967ms
*** [deploy:update_code] rolling back
Although i have installed that gem in gem file and it shows in gem list on local host. Can somebody tell me why i am getting this error in "cap deploy" command.
Are you sure you have all dependencies installed on the remote host? Similar errors are produced if you're installing a gem and don't have required packages installed on your system
i got where the real problem is. I have added a line in my "deploy.rb" file and added the required gem in my gemfile and run the bundle install. Now i can easily deploy my code. Thanks for reply friends.