I\'ve been using cucumber without trouble for with Rails 3 for a while, but after a whole bunch of tinkering today (including gem cleanup), I get the following error wheneve
It looks like after your gem cleanup, builder has been removed and then installed latest version (3.0.0). But rails3 and some of other gems requires ~> 2.1.2, which means that builder version should be >= 2.1.2 and < 3.0.0. So you need to remove 3.0.0 from your system gems:
gem uninstall builder
Use sudo
if needed.
Then in your project:
bundle install
NOTE: If you had put manually builder into your Gemfile, make sure that you put ~> 2.1.2. Otherwise bundler will try to install latest stable version (3.0.0), which is not compatible with current version of rails and other popular gems:
gem "builder", "~> 2.1.2"
I would recommend you to store gems in separate locations for each project:
bundle install --path .gems
In this case you can do everything you want with your system gems and it will reduce risk to get in situation like you do now.
Why not use the simpler way?
bundle exec cucumber features
I had the same problem with builder and some other gems. Tried using the "gem unistall" way but then I got an error saying that I need the newer gem. So I was in a deadlock.
With the above command it worked ...