Error installing ffi gem
Do this before you install the gem:
sudo apt-get install libffi-dev
Related cards:
Error installing gem with native extension (collect2: error: ld returned 1 exit status)
If you have problems installing a gem and get a error collect2: error: ld returned 1 exit status
it's due to missing development headers of a library (ld
is the linker).
For example, with this output:
$ gem install json
Building native ...
Error installing the raspell gem
When you get this while installing the raspell gem:
ERROR: Error installing raspell:
ERROR: Failed to build gem native extension.
You need some libraries:
sudo apt-get install libaspell-dev
Fix "An error occurred while installing debugger-linecache" with Ruby 1.9.3
You're better off using debugger-ruby_core_source
:
gem install debugger-ruby_core_source
If you can't do this, try the following.
Here is how to fix the following error when installing the debugger
gem fails:
Gem::Instal...
Bundler error: Downloading gem revealed dependencies not in the API
Recent Bundler (1.16.1) started complaining about missing dependencies in the Gemfile. This is due to a stricter handling of specifications (see attached link).
The error message looks like this:
Downloading example-gem-1.2.3 revealed depend...
Fix Rubygems binary error: undefined method `activate_bin_path' for Gem:Module (NoMethodError)
So you're getting an error like this:
undefined method `activate_bin_path' for Gem:Module (NoMethodError)
Here is what happened:
- You installed a recent version of Rubygems
- You installed some gems that install a binary (like `bun...
Ubuntu: Fix "An error occurred while installing pg"
If you get an error like this:
An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure thatgem install pg -v '0.17.1'
succeeds before bundling.
Then do this:
sudo apt-get install libpq-dev
... an...
Fix error: Missing the mysql2 gem
So you got this error, even though your Gemfile bundles mysql2
:
!!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'
or
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not par...
Fix Rubygems error: undefined method `source_index' for Gem:Module
You are probably using Ruby 1.8.7 with a too recent versions of Rubygems.
Downgrade your Rubygems to the latest version that works with 1.8.7.
See also
- [Fix Rubygems warning: Gem.source_index is deprecated, use Specifica...
How to fix: "500 Internal Server Error" after adding Rack::Bug
When Rack::Bug
has been added to your project and your Apache2/Passenger only replies with an Error 500 (Internal Server Error
) you won't get any love from both application and Apache logs.
You can start a script/server
and try connecting t...
Download Ruby gems without installing
You can download .gem
files using gem fetch
:
gem fetch activesupport consul
This will produce files like active-support-5.0.0.gem
and consul-0.12.1.gem
in your working directory.
Dependencies will not be downloaded.