Running OS X Snow Leopard
I installed JRuby to /opt/local/jruby
I put /opt/local/jruby/bin on my path ahead of /opt/local/bin which has
Ruby 1.8.7 installed via MacPorts (or is that the base install?).
jruby gem install rails
jruby gem install rspec
jruby gem install rspec-rails
All of those work just fine and dandy. Now I get to the point in the
instructions for installing rspec-rails (
https://github.com/rspec/rspec-rails#readme) that says:
gem install rspec-rails
This installs the following gems:
Add rspec-rails to the :test and :development groups in the Gemfile:
group :test, :development do
gem “rspec-rails”, “~> 2.4”
It needs to be in the :development group to expose generators and rake
tasks without having to type RAILS_ENV=test.
Now you can run:
script/rails generate rspec:install
This adds the spec directory and some skeleton files, including the
Issue #1 - When it says “Add rspec-rails to the :test and :development
groups in the Gemfile:” to which Gemfile is it referring? I’m assuming
it means rspec-rails and not one of the Gemfiles from the other gems
rspec-core, rspec-expectations, etc.) although it could mean the rspec
but the “gem install” was for rspec-rails so I’m going with that one.
know if I’m wrong there please.
Issue #2 - When I run “which script” I get /usr/bin rather than in the
directory so I’m a bit worried about that. Is “script” a generic command
is it a Ruby and/or Rails specific command and that indicates that I
either a path or installation problem?
Issue #3 - To be safe I run “jruby script/rails generate rspec:install”
Macintosh-2:gems wobbet$ jruby script/rails rspec:install
Error opening script file:
/opt/local/jruby/lib/ruby/gems/1.8/gems/script/rails (No such file or
I’m hoping that means I’m not having an issue with my path by explicitly
invoking jruby at the front although I’m not certain. Either way I have
error that I don’t understand.
Any help is appreciated.