Building Gem 'RedCloth' with Bundler and GCC 4.6
If you cannot install the gem 'RedCloth' via bundle install you might want to try the following.
Specifying extra build options for bundler which will only be applied when building RedCloth:
bundle config build.RedCloth --with-cflags=-w
Related cards:
Freeze (vendor, unpack) a single Ruby gem with and without Bundler
When you need to patch an existing gem, one way is to "vendor" the gem by copying it into the vendor/gems
directory of your Rails project. You can then make any changes you require and Rails will use the vendored version of the gem after a serve...
How to list updateable dependencies with Bundler and Yarn
Bundler
bundle outdated [--filter-major|--filter-minor|--filter-patch]
Example output for bundle outdated --filter-major
Other examples
A useful flag is --strict
as it wi...
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...
Migrate gem tests from Travis CI to Github Actions with gemika
We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This is a step-by-step guide on how to do this.
Note that this guide requires the gem to use gemika.
- Go...
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...
Updating a gem created with Bundler
Since May 2011 we are cutting new gems using Bundler, which is less painful than cutting gems using Jeweler. You...
Bundler: How to release a gem with 2FA enabled
Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release. Despite the CLI of the rake release
task does not work well with the command prompt for your OTP code with Bundler versions `< 2...
Gem Versioning and Bundler: Doing it Right
When running an executable, ALWAYS use bundle exec. In some cases, running executables without bundle exec may work, if the executable happens to be installed in your system and does not pull in any gems that conflict with your bundle. However, th...
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....
How to update a single gem conservatively
The problem
Calling bundle update GEMNAME
will update a lot more gems than you think. E.g. when you do this:
bundle update cucumber-rails
... you might think this will only update cucumber-rails
. But it actually **updates cucumber...