How do you run specific cucumber feature tests in Rails - ruby-on-rails

I'm trying to run a specific feature test in my Rails app but keep getting this error
Cucumber './script/cucumber' script not found. To initialize Cucumber support, install the 'cucumber-rails' gem, reload generators and run the 'cucumber:install' generator from RubyMine (use Tools|Run Rails Generator... action)
I follow these commands
gem install cucumber-rails
rails g rspec:install
rails g cucumber:install
but then I get this message followed by the same error why I try to run the test
Could not find generator 'cucumber:install'.
Am I reloading the generators correctly?

Related

error when running rails g cancan:ability

I added the gem cancancan, ~> 1.10 to my gemfile and then ran bundle install.
That all went well but then I get the following in my terminal when I run > rails g cancan:ability:
Running via Spring preloader in process 967 Could not find generator 'cancan:ability'. Maybe you meant 'coffee:assets', 'channel' or 'css:assets' Run rails generate --help for more options.
I tried running the command spring stop and then ran rails g cancan:ability and I get the same message.
Any ideas? Thanks for the help.

Issues with bundle exec rake test

I am new to rails, using Michael Hart's book on Rails tutorial for my learning. I've done gem install bundler and also bundle install to get all my gems specified in the gemfile;
But when I run bundle exec rake test to test my application it shows system cannot find the path specified.
I've written my test code in controller_test.rb with require test_helper included as part of the test code.
How can I fix this issue?

Rails Generate migration throwing error

i added a gem "acts-as-taggable-on" and when i ran the rails g acts_as_taggable_on:migration command. i got this
Could not find generator 'acts_as_taggable_on:migration'. Maybe you meant 'active_record:migration', 'test_unit:integration' or 'migration'
Run rails generate --help for more options.
how to get this migration succesfull?

Can't find old RSpec version after switching from RVM to rbenv

A couple of days ago I switched from RVM to rbenv. I now have issues with rspec for a rails project. I'm getting this message:
You have already activated rspec-core 3.0.3, but your Gemfile requires rspec-core 2.14.8.
I tried to do:
gem install rspec-core '2.14.8'
but then I got this error message:
ERROR: Could not find a valid gem '2.14.8' (>= 0) in any repository
after which rbenv just uses RSpec 3.0.3.
So the only way now to run the test in my Rails project is to use:
bundle exec rspec spec
Is there a way to install a pre-RSpec 3 version of RSpec beside the installed RSpec 3.0.3 so I can again run the test in my Rails project by just typing:
rspec spec
I'm using Rails 4.1.1.
The Rails 4 way to run things under bundler and spring is to run scripts in the bin directory. To generate such a script for rspec, install the spring-commands-rspec gem and run bundle exec spring binstub --all. If your current directory is the root of your rails project, you can then just type bin/rspec.
Side note: RSpec runs the spec directory by default, so you don't need to type spec.
To save typing bin/, either add your Rails project's bin directory to your PATH in the usual way or use direnv.
You probably want rspec-rails, not just RSpec. If so, since you're using Rails 4.1.x, you'll need rspec-rails 2.99, which needs rspec 2.99.x, not 2.14.x. (Documented in rspec-rails' Changelog.)

rails generate ckeditor:install for rails 2.3?

I'm trying to install and set up this gem - https://github.com/galetahub/ckeditor, but when I follow the instructions and run:
rails generate ckeditor:install
I get an error because "rails generate" is a rails 3 command (I think?!).. so my question is, what is the equivalent rails 2 command to run this?
ruby script/generate ckeditor:install
This should do it in Rails 2
Sven

Resources