Install the Nokogiri gem on Ubuntu servers
You need to install the following packages before you can build the Nokogiri gem:
sudo apt-get install libxml2-dev libxslt1-dev
Related cards:
Install the Paperclip gem on Ubuntu servers
You need to install the following packages before you can build the Paperclip gem:
sudo apt-get install imagemagick librmagick-ruby
Bundler: Gemfile.lock is corrupt & gems are missing from the DEPENDENCIES section
So you're getting this failure when running bundle install
on an older project:
Your Gemfile.lock is corrupt. The following gems are missing from the DEPENDENCIES section: 'archive-tar-minitar' 'hoe' 'rcov'
This happens when you ar...
How to make changes to a Ruby gem (as a Rails developer)
At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads), active_type (> 1M downloads), and geordi (> 200k downloads)
Developing a Ruby gem is different from developing Rails applications, w...
How to fix: Gems are unavailable although they are installed
- If Rails or Rake are complaining about a missing gem that is listed in your
Gemfile.lock
and the listed version is properly installed, something is seriously wrong and needs to be fixed. - If you accidently executed
bundle install some_gem
a...
Bundler in deploy mode shares gems between patch-level Ruby versions
A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem versions. I'll try to explain how the...
Installing Ruby 2.3 or below on Ubuntu 17 and above
From Ubuntu 17, rbenv fails to install Ruby below 2.4 because of a mismatching OpenSSL dependency: it needs libssl1.0-dev
for the installation process, but recent Ubuntus come with libssl-dev
.
From the linked StackOverflow comment:
As fa...
How to install packages from newer Ubuntu releases
We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come with 6 months of support. If there is really no other way, it's possible to install packages from later Ubuntu re...
Gemspecs must not list the same gem as both runtime and development dependency
When you're developing a gem, never list the same dependency as both runtime and development dependency in your .gemspec
.
So don't do this:
spec.add_dependency 'activesupport'
spec.add_development_dependency 'activesupport', '~> 2....
Install RubyGems on Ubuntu/Debian
First of all: You could just use RVM which would make the pain go away. If for some reason you can't, proceed.
Do not use rubygems from the apt repository.
- Get the latest [RubyGems](http://rubygems.org/page...
Sudo a gem executable does not work on Ubuntu
Today I needed to execute a ruby gem executable with sudo
. But, surprisingly, bash would tell me command not found
for the gem that ran lovely without sudo
.
Gem bin
s are installed to /var/lib/gems/1.8/bin
, which is not in sudo’s PATH
....