Another day in the life of a Windows+Ruby dev

So today I decided to try to fix issue 358 of cucumber. I’m not even to the point of reproducing the bug yet. *sigh*

So I checked out the cucumber source and tried to install it, at which point rake decided to stop working since cucumber has rake as a development dependency and trying to install rake on windows with 1.9.2 breaks rake. Luckily, there was a quick workaround for that (deleting rake.gemspec).

*Then*, since I was trying to do rake install_gem (which is the documented way to install cucumber from source and appears to be a Bundler task), I ran into the bug described in this ruby-bundler google group post wherein that task would quit with error message “Unable to determine name from existing gemspec. Use :name => ‘gemname’ in
#install_tasks to manually set it.” (and no, following the instructions in the error message doesn’t help). Arve in that post seems to have a patch to bundler to fix it, which I tried applying, but it didn’t fix it for me.

So then I just decided to try rake -T in cucumber, and there are tasks build and install that work and also seem to be Bundler tasks, even though install_gem doesn’t work.

I think I can finally try reproducing that cucumber bug now, and I’ll put looking into the bundler issue on my list for another day.

At least I’m learning a lot!

This entry was posted in Ruby on Windows and tagged , , , . Bookmark the permalink.

5 Responses to Another day in the life of a Windows+Ruby dev

  1. haoaixue2006 says:

    I followed the guide to install cucumber-rails. When I run “rails generate cucumber:install # Rails 3″, I get an error “Could not find generator cucumber:install.” I have run “bundle install”.

    Do yo know how can I solve this problem?
    Thank you!

    • Carol says:

      What does your Gemfile look like? The RSpec Book (it’s about Cucumber too, and I highly recommend it) has this as their Gemfile:


      source 'http://rubygems.org'

      gem 'rails', '3.0.0'
      gem 'sqlite3-ruby', :require => 'sqlite3'

      group :development, :test do
      gem "rspec-rails", ">= 2.0.0"
      gem "cucumber-rails", ">= 0.3.2"
      gem "webrat", ">= 0.7.2"
      end

  2. haoaixue2006 says:

    Yes, I know my gemfile is wrong. Now I add
    “gem ‘mysql2′
    gem ‘cucumber’
    gem ‘cucumber-rails’
    gem ‘rspec-rails’
    gem ‘win32console’
    gem ‘capybara’
    ” to my gemfile.
    But I get another error: ” Could not find “step_definitions/web_steps_#.rb.erb” in any of your source paths . Your current source paths are: D:/Development/MasterMind/lib/templates/cucumber/install C:/Ruby192/lib/ruby/gems/1.9.1/gems/cucumber-rails-0.3.2/templates/install”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>