← Back to Upcase

Issue with installing jasminrice gem


(Acandael Acandael) #1

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:innew’
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:indecomposed_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:ineach’
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:inblock 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:inblock 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:inwith_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:indraw’
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:inload’
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:inload_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:inblock 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:inload_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:inblock 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:inexecute’
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:inexecute_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:ininstance_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:inblock 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:inblock (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:inblock 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:ineach_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:inrun_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:inmethod_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:inrequire’
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 ?


(Derek Prior) #2

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.