Closed ping0xFF closed 9 years ago
Hi there,
I'm new to Spree and I get the same error when running rails s:
/Users/apple/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/action_dispatch/routing/mapper.rb:238:in
add_request_method': You should not use the match
method in your router without specifying an HTTP method.
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" (ArgumentError)`
I'm running on spree 3.0.1 and rails 4.2.0 When using the edge version I have a conflict due to the dependency on spree 3.1.0 beta. at bundle install When using the stable version of spree_contact_us I got the issue above
Any idea of how solving this issue?
Ok finally succeeded to use the gem by adding branch: 3-0-stable to my gemfile.
@maximedelpit , Unless your issue is related to @sybind's issue, please file it separately.
@sybind,
Did you get this issue when trying to run the install?
With that being said it sounds like it is an issue with how the routes are being defined and Rails ~> 4.0.12 not liking it. Could you submit a PR to 2-2-stable
for the fix?
This was fixed a long time ago by https://github.com/spree-contrib/spree_contact_us/commit/fb4147bfcd11ce0c5db682d84ed54da75e61269f I would make sure you guys are up to date I don't see match being used int he routes for 2-2-stable+ and probably even further back than that.
There seems to be an issue with this gem and the edge version of spree; 3.0.2 This error reported by @sybind gets displayed.
If you read the routes file https://github.com/spree-contrib/spree_contact_us/blob/master/config/routes.rb you can see there are no uses of "match" because it was properly changed to "get" in this commit https://github.com/spree-contrib/spree_contact_us/commit/fb4147bfcd11ce0c5db682d84ed54da75e61269f#diff-21497849d8f00507c9c8dcaf6288b136L5 sorry I have no idea why your seeing the error, but if you figure it out feel free to submit a PR.
I think the ReadMe should be updated with possibly the latest stable version, I could send a PR if you dont mind. The issue was with version 1.0. I never knew there was a recent version till I did some digging. Guess the above persons fell into same trap.
Please submit a PR thanks.
I'm using rails 4.0.13 and spree 2-2-stable, and was getting the below error. I changed 'match' to 'get' in /home/dan/.rvm/gems/ruby-2.2.1@testapp/gems/spree_contact_us-1.1.0/config/routes.rb and I could run 'bundle exec rails g spree_contact_us:install' fine.
Since this is a rails 4 thing, would I commit a fix here? I'm not too sure how to help. Please advise.