Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a couple solutions, the easiest of which would be to try running <code>bundle exec cucumber</code> first, and see if that solves your problem.</p> <p>If that doesn't work, delete your rails3tutorial gemset and re-create it again:</p> <pre><code>rvm gemset delete rails3tutorial rvm 1.9.2-p290@rails3tutorial --create </code></pre> <p>Then run <code>bundle</code>, and hopefully it will install your gems for you. Follow this up with <code>bundle exec cucumber</code> (I almost always run my specs and cukes using <code>bundle exec</code> so that it doesn't try accidentally loading stale gems).</p> <p>Hopefully this works!</p> <p>UPDATE: Explaining <code>bundle exec</code> a little more</p> <p><code>bundle exec</code> is a command that bundler comes with that will run any other command in the context of your Gemfile. In this case, you're essentially telling it to run the <code>cucumber</code> command but <em>only</em> with the gems from your Gemfile, and not with all the gems currently available.</p> <p>For instance, if you have previously installed <code>activesupport 3.2.1</code>, and your Gemfile asks for <code>activesupport 3.1.0</code>. When this happens I believe the cucumber command itself pulls in 'activesupport' (maybe via the <code>require 'cucumber/rails'</code> call in env.rb) which grabs any random version of activesupport it can (let's say it grabs 3.2.1) from your available gems. After this, it decides to load up your rails environment to start running your features. When it starts loading your actual app, the code looks at your Gemfile.lock and sees that what you actually want is <code>activesupport 3.1.0</code>, but it can't load an old version on top of a new version, so it crashes with the error James Lin pasted.</p> <p>This is why, if you're using rvm, it's a good idea to keep separate gemsets for your separate projects, and delete/re-create the gemsets if you're updating your gems on that project so you don't keep old versions of gems around. Alternatively, <code>bundle exec</code> tends to solve 99% of the problems as well. If you aren't using rvm, and have multiple projects, then you probably have many different versions of many different gems, and you should always use <code>bundle exec</code> to do things like execute rake tasks, run cucumer features and other unit tests, etc.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload