Note that there are some explanatory texts on larger screens.

plurals
  1. POcucumber performance & Rail 4 - gem version clashes?
    primarykey
    data
    text
    <p>I'm using Rails 4 (4.0.0) for the first time.</p> <p>I'm not happy with Cucumber's speed.</p> <p>I did the following:</p> <ol> <li><p>Created the app with <code>rails new MyApp -T</code>.</p></li> <li><p>Added rspec-rails, cucumber-rails, database_cleaner &amp; therubyracer to the Gemfile, then ran <code>bundle install</code>.</p></li> <li><p>Ran <code>rails generate rspec:install</code> and <code>rails generate cucumber:install</code>.</p></li> </ol> <p>I've not created any models, controllers, view, specs or features. I'm doing double cycle TDD and ran <code>cucumber</code> against no features, expecting it to take less than a couple of seconds. I then invoked it with <code>rake</code> and <code>bundle exec</code> and compared the results (shown below). </p> <p><code>bundle exec cucumber</code></p> <pre><code> noel@noel-U36JC:~/commons/MyApp$ time bundle exec cucumber Using the default profile... 0 scenarios 0 steps 0m0.000s real 0m22.017s user 0m20.749s sys 0m1.044s </code></pre> <p><code>rake cucumber</code></p> <pre><code> noel@noel-U36JC:~/commons/MyApp$ time rake cucumber /home/noel/commons/MyApp/db/schema.rb doesn't exist yet. Run `rake db:migrate` to create it, then try again. If you do not intend to use a database, you should instead alter /home/noel/commons/MyApp/config/application.rb to limit the frameworks that will be loaded. real 0m18.556s user 0m17.329s sys 0m1.064s </code></pre> <p><code>cucumber</code></p> <pre><code> noel@noel-U36JC:~/commons/MyApp$ time cucumber WARN: Unresolved specs during Gem::Specification.reset: rake (&gt;= 0.8.7) hike (~&gt; 1.2) tilt (!= 1.3.0, ~&gt; 1.1) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. Using the default profile... 0 scenarios 0 steps 0m0.000s real 0m19.862s user 0m18.681s sys 0m1.028s </code></pre> <p>The <code>Gemfile.lock</code> has </p> <pre><code> ... hike (1.2.3) ... rake (10.1.0) ... tilt (1.4.1) ... </code></pre> <p>I haven't been able to find out where Gem::Specification.reset is getting its information from. I've run <code>gem cleanup</code> and <code>gem uninstall</code><em>gemname</em> and not gotten anywhere with that either.</p> <p>Any help would be much appreciated. </p> <p>Update: forgot to mention, am running ruby 1.9.3-p484 on RVM. The lappy I'm developing on is 2.5 years old, both ubuntu &amp; RVM have been loaded the whole time, so RVM cruff could be a factor too.</p> <p>Update (an hour after comment 2):</p> <p>I tried setting up a new project specific RVM gemset, thinking the cruff in global getset might be the issue.</p> <p>The setup appeared to work find.</p> <p>During the <code>bundle install</code>, the gem install of rake failed. No joy!</p> <pre><code> noel@noel-U36JC:~/commons/MyApp$ rvm 1.9.3-p484 noel@noel-U36JC:~/commons/MyApp$ rvm gemset create MyApp gemset created MyApp =&gt; /home/noel/.rvm/gems/ruby-1.9.3-p484@MyApp noel@noel-U36JC:~/commons/MyApp$ rvm --ruby-version use 1.9.3-p484@MyApp Using /home/noel/.rvm/gems/ruby-1.9.3-p484 with gemset MyApp noel@noel-U36JC:~/commons/MyApp$ bundle install Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/.. NoMethodError: private method `open' called for Gem::Package:Class An error occured while installing rake (10.1.0), and Bundler cannot continue. Make sure that `gem install rake -v '10.1.0'` succeeds before bundling. noel@noel-U36JC:~/commons/MyApp$ gem install rake -v '10.1.0' Successfully installed rake-10.1.0 Installing ri documentation for rake-10.1.0 1 gem installed noel@noel-U36JC:~/commons/MyApp$ bundle install Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/.. NoMethodError: private method `open' called for Gem::Package:Class An error occured while installing rake (10.1.0), and Bundler cannot continue. Make sure that `gem install rake -v '10.1.0'` succeeds before bundling. noel@noel-U36JC:~/commons/MyApp$ time cucumber The program 'cucumber' is currently not installed. You can install it by typing: sudo apt-get install cucumber real 0m0.126s user 0m0.064s sys 0m0.056s </code></pre> <p>Update:</p> <p>Looks to be a Bundler version issue.</p> <p>Bundler version was 1.1.3.</p> <p>Is now 1.3.5.</p> <pre><code> noel@noel-U36JC:~/commons/MyApp$ time cucumber Using the default profile... 0 scenarios 0 steps 0m0.000s real 0m6.926s user 0m6.592s sys 0m0.280s </code></pre> <p>Well that appears to have worked. :)</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. 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