Issue with installing jasminrice gem

Hi,

I installed the jasminerice and guard-jasmine gems, but when I run:

rails g jasminrice:install

I get this error message:

/usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:191:in `normalize_conditions!': You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError)

If you want to expose your action to both GET and POST, add via: [:get, :post] option.
If you want to expose your action to GET, use get in the router:
Instead of: match “controller#action”
Do: get “controller#action”
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:67:in initialize' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in new’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in add_route' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1417:in decomposed_match’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1398:in block in match' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in each’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in match' from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/jasminerice-0.0.10/config/routes.rb:5:in block in <top (required)>’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:514:in instance_exec' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:514:in block in with_default_scope’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:718:in scope' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:513:in with_default_scope’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:314:in eval_block' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in draw’
from /usr/local/rvm/gems/ruby-2.0.0-p247/gems/jasminerice-0.0.10/config/routes.rb:1:in <top (required)>' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in load’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in block in load' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in load_dependency’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in load' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in block in load_paths’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in each' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in load_paths’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in reload!' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in block in updater’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in call' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in execute’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in updater' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in execute_if_updated’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in block in <module:Finisher>' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/initializable.rb:30:in instance_exec’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/initializable.rb:30:in run' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/initializable.rb:55:in block in run_initializers’
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in block in tsort_each' from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in block (2 levels) in each_strongly_connected_component’
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in each_strongly_connected_component_from' from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in block in each_strongly_connected_component’
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in each' from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in each_strongly_connected_component’
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in tsort_each' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/initializable.rb:54:in run_initializers’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application.rb:215:in initialize!' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in method_missing’
from /Users/acandael/Sites/hashtag/config/environment.rb:5:in <top (required)>' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application.rb:189:in require’
from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/application.rb:189:in require_environment!' from /usr/local/rvm/gems/ruby-2.0.0-p247@global/gems/railties-4.0.0/lib/rails/commands.rb:45:in <top (required)>’
from bin/rails:4:in require' from bin/rails:4:in ’

The spec/javascripts folder is not created.

How can I solve this issue to successfully install jasminrice ?

This is because jasmine-rice adds routes to your gemfile that use the match method, which is not supported in Rails 4. The good news is there’s already a patch that fixes this. The bad news is that it doesn’t seem like it has been released in the gem yet.

Try editing the jasminerice line in your gemfile to be: gem 'jasminerice', github: 'bradphelan/jasminerice' to get the latest version from github. Then run bundle update jasminerice. I believe you should be able to run the installer after that.

2 Likes