GithubHelp home page GithubHelp logo

spree-contrib / spree_email_to_friend Goto Github PK

View Code? Open in Web Editor NEW
49.0 12.0 109.0 179 KB

Email a friend functionality for Spree Commerce.

Home Page: http://guides.spreecommerce.org

License: BSD 3-Clause "New" or "Revised" License

Ruby 84.68% JavaScript 0.22% CSS 0.28% HTML 14.81%

spree_email_to_friend's Introduction

Spree Email to Friend

Build Status CodeClimate Gem Version

The Spree Email to Friend extension enables you to send the product reference to your friend via email.


Installation

Add to your Gemfile

gem 'spree_email_to_friend', github: 'spree-contrib/spree_email_to_friend', branch: 'master'

Run

bundle install

Thats all!


Contributing

See corresponding contributing guidelines.


Copyright (c) 2009-2015 Jorge Calás Lozano, Roman Smirnov, Trung Lê and other contributors, released under the New BSD License

spree_email_to_friend's People

Contributors

adhlssu07 avatar bbonislawski avatar bdq avatar brchristian avatar calas avatar cluster444 avatar damianlegawiec avatar futhr avatar greinacker avatar hates avatar iloveitaly avatar jdutil avatar kpitn avatar lbrapid avatar lcx avatar lenart avatar lpradovera avatar radar avatar relu avatar romul avatar rosalin avatar rterbush avatar schof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_email_to_friend's Issues

Problem referencing mail preferences in 1.0

I got errors in lines like:

./app/mailers/spree/to_friend_mailer.rb:2:  default :from => Spree::Config[:mails_from]

I believe we have to use:

mail_method.preferred_mails_from

instead.

I'm digging deeper in a bit.

Add Honeypot Captcha Branch

Captchas generally create a bad UX and create another barrier to completion for the user.

I've been using the honeypot-captcha for all forms on my spree site it has worked great – blocking nearly all spam bots and removing the need for any captcha from the users' POV.

This approach will not work for everybody, but it might be good to provide a branch on the master repo with a version of the extension that uses honeypot-captcha instead of the standard spree_email_to_friend captcha system.

Thoughts?

Specs are failing

Spec are failing because of lack of proper mails_from preference.

A comprehensive list of steps to reproduce the issue.

  1. install all dependencies
  2. bun bundle exec rspec spec

What you're expecting to happen
I'm expecting all specs to pass

What's actually happening.

 107 LOC (51.4%) covered.
/Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bundler/gems/spree-5f439e405e97/core/app/models/spree/preferences/preferable.rb:62:in `has_preference!': mails_from preference not defined (NoMethodError)
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bundler/gems/spree-5f439e405e97/core/app/models/spree/preferences/preferable.rb:42:in `get_preference'
    from /Users/michal/spree_email_to_friend/app/mailers/spree/to_friend_mailer.rb:2:in `<class:ToFriendMailer>'
    from /Users/michal/spree_email_to_friend/app/mailers/spree/to_friend_mailer.rb:1:in `<top (required)>'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:360:in `require_or_load'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:494:in `load_missing_constant'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:184:in `const_missing'
    from /Users/michal/spree_email_to_friend/spec/mailers/to_friend_mailer_spec.rb:1:in `<top (required)>'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bin/rspec:23:in `load'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bin/rspec:23:in `<main>'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bin/ruby_executable_hooks:15:in `eval'
    from /Users/michal/.rvm/gems/ruby-2.2.2@spree_email/bin/ruby_executable_hooks:15:in `<main>'

honeypot-captcha Version

I've created a version of this extension which uses the honeypot-captcha gem, which for some sites is a great alternative to ugly captchas.

I'd love to see the honeypot-captcha branch of this extension exist as a branch on the main repository for others who might want to similar functionality.

undefined method store_menu?

I am using the gem spree_wishlist, which depends on spree_email_to_friend. All 2.0-stable branches.

When I clicked on Email a friend button, I receive an error:

NoMethodError - undefined method `store_menu?' for #<#<Class:0x007fd10a8e3c20>:0x007fd10a8eaca0>:

I found the solution here.

Add the following to email_sender_controller.rb:

helper Spree::StoreHelper
helper Spree::BaseHelper

Afterwards, everything worked just fine.

Improper initialization and/or use of recipients field

Recipients field of MailToFriend model is handled in some code sections as string of addresses joined by ',' (tests, mailer) while in some others (model) as array of email addresses. This results in improper generation of mail to header field and in my case leads to gmail rejecting to send email due to invalid to header. Since tests do not cover initialize method in the MailToFriend model this issue is not uncovered by them.

Reading this gem's code I feel that it requires additional cleanup as there are also other issues present.

For example recipients field contains all addresses from recipient_email field and vice versa. Since in mailer values for to and bcc header use and concat values from both recipient_email and recipients it results in same email address being present two times in these headers.

I can submit a pull request, but I want first to ask how would you like to handle this?

@JDutil @futhr any thoughts?

Rails 4 regular expression issue "provided regular expression is using multiline anchors"

There seems to be an issue with this gem and the regular expression when used with Rails 4.


Steps to reproduce

gem install rails -v 4.0.2
gem install spree
rails _4.0.2_ new my_store
cd my_store
spree install my_store

I use RVM

echo "ruby-2.0.0-p353" > .ruby-version
echo "spreestoregeneric" >.ruby-gemset
rvm use ruby-2.0.0-p353@spreestoregeneric
gem install bundler
echo "gem 'spree_email_to_friend', :git => 'https://github.com/spree/spree_email_to_friend.git', :branch => '2-1-stable'" >> Gemfile

bundle install

See the bug:

rails -s 
  • click on a product
  • click on "email a friend"

Result:
ERROR: "The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option? "

I've used this gem to validate email address. Maybe use it?

https://github.com/alexdunae/validates_email_format_of

invalid address

Hi Team,

I am using 2-2-stable version to send an email to a friend. After adding this gem It is successfully created a link "Email a friend" on product show page. when i am trying to send a mail to friend after providing a valid email I am getting 500 internal server error. Following is the complete log in my console(Tested in both development & production).

Completed 500 Internal Server Error in 3072ms

Net::SMTPFatalError (550 <[email protected], ["[email protected]"]> invalid address
):
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:957:in `check_response'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:926:in `getok'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:869:in `rcptto'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:850:in `block in rcptto_list'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:848:in `each'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:848:in `rcptto_list'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:663:in `send_message'
  mail (2.5.4) lib/mail/network/delivery_methods/smtp.rb:113:in `block in deliver!'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/smtp.rb:521:in `start'
  mail (2.5.4) lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
  spree_core (2.2.1) lib/spree/core/mail_method.rb:9:in `deliver!'
  mail (2.5.4) lib/mail/message.rb:2129:in `do_delivery'
  mail (2.5.4) lib/mail/message.rb:232:in `block in deliver'
  actionmailer (4.0.4) lib/action_mailer/base.rb:456:in `block in deliver_mail'
  activesupport (4.0.4) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.4) lib/active_support/notifications.rb:159:in `instrument'
  actionmailer (4.0.4) lib/action_mailer/base.rb:454:in `deliver_mail'
  mail (2.5.4) lib/mail/message.rb:232:in `deliver'
  /home/maisapride/.rvm/gems/ruby-2.1.1/bundler/gems/spree_email_to_friend-2fd0263ba01e/app/controllers/spree/email_sender_controller.rb:42:in `send_message'
  /home/maisapride/.rvm/gems/ruby-2.1.1/bundler/gems/spree_email_to_friend-2fd0263ba01e/app/controllers/spree/email_sender_controller.rb:27:in `block (2 levels) in mail_to_friend'
  actionpack (4.0.4) lib/action_controller/metal/mime_responds.rb:191:in `call'
  actionpack (4.0.4) lib/action_controller/metal/mime_responds.rb:191:in `respond_to'
  /home/maisapride/.rvm/gems/ruby-2.1.1/bundler/gems/spree_email_to_friend-2fd0263ba01e/app/controllers/spree/email_sender_controller.rb:20:in `mail_to_friend'
  /home/maisapride/.rvm/gems/ruby-2.1.1/bundler/gems/spree_email_to_friend-2fd0263ba01e/app/controllers/spree/email_sender_controller.rb:11:in `send_mail'
  actionpack (4.0.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.0.4) lib/abstrinvalid addressact_controller/base.rb:189:in `process_action'
  actionpack (4.0.4) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.0.4) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (4.0.4) lib/active_support/callbacks.rb:453:in `_run__328579954__process_action__callbacks'
  activesupport (4.0.4) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.4) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (4.0.4) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.0.4) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.0.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.0.4) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.0.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.0.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.0.4) lib/abstract_controller/base.rb:136:in `process'
  actionpack (4.0.4) lib/abstract_controller/rendering.rb:44:in `process'
  actionpack (4.0.4) lib/action_controller/metal.rb:195:in `dispatch'
  actionpack (4.0.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.0.4) lib/action_controller/metal.rb:231:in `block in action'
  actionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in `call'
  actionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
  actionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:48:in `call'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:674:in `call'
  railties (4.0.4) lib/rails/engine.rb:511:in `call'
  railties (4.0.4) lib/rails/railtie/configurable.rb:30:in `method_missing'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:674:in `call'
  omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
  omniauth (1.2.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.1) lib/omniauth/strategy.rb:164:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:35:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/flash.rb:241:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/cookies.rb:486:in `call'
  activerecord (4.0.4) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
  activerecord (4.0.4) lib/active_record/migration.rb:373:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.0.4) lib/active_support/callbacks.rb:373:in `_run__155041148__call__callbacks'
  activesupport (4.0.4) lib/active_support/callbacks.rb:80:in `run_callbacks'
  actionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.0.4) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.0.4) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.0.4) lib/rails/engine.rb:511:in `call'
  railties (4.0.4) lib/rails/application.rb:97:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
  /home/maisapride/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'


  Rendered /home/maisapride/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.8ms)
  Rendered /home/maisapride/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.4/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.7ms)
  Rendered /home/maisapride/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.6ms)
  Rendered /home/maisapride/.rvm/gems/ruby-2.1.1/gems/actionpack-4.0.4/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (31.0ms)
----------------------------------------------------------------------------------------------------------------

I am using following versions of related gems:
gem 'rails', '4.0.4'
gem 'spree', '2.2.1'
gem 'spree_gateway', git: 'https://github.com/spree/spree_gateway.git', branch: '2-2-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'
gem "spree_social", :git => "git://github.com/spree/spree_social.git", branch: '2-2-stable'
gem 'spree_wishlist', github: 'spree/spree_wishlist', branch: '2-2-stable'
gem 'spree_email_to_friend', github: 'spree/spree_email_to_friend', branch: '2-2-stable'

and ruby 2.1.1p76 (2014-02-24 revision 45161) [i686-linux]

After debugging I found the issue in Spree::ToFriendMailer class Line no:14

opts[:to] = [mail.recipient_email, mail.recipients.to_s.split(',')].flatten

It is generating option for :to like => [email protected], ["[email protected]"]

After replacing the line:14 with => opts[:to] = mail.recipients.join(", ")

It is working fine.

I am requesting you to let me know if any one facing this problem.

Thanks & Regards,
m.vijaysekhar

Namespace Updates

Hello there, so I made some changes recently to get this extension working with Spree 0.80.x and above. joneslee85, not sure if you had been doing similar work locally or not but I pushed to master when I initially started working on these changes, so I've sort of stuck with it.

I still need to take a look at the specs, but as far as functionality goes I believe the extension is working except for updating captcha settings in the admin interface. I took a look at that issue but couldn't see exactly what was wrong there.

Remaining work:

  • Get specs passing (rake test_app seems to break due to changes in spree almost every time I get it running again, not sure what the current deal is)
  • Fix setting of Spree::Captcha::Config at app/controllers/spree/admin/captcha_settings_controller.rb:5

Route.rb and emailsendercontroller breaking extension

You seem to have switched from Rails.application.routes.draw to Spree::Core::Engine.routes.prepend
in your routes.rb and it is breaking email_to_friend extension. The error it is throwing is:

gems/spree_email_to_friend-bbc7b0b9ac46/config/routes.rb:1:in <top (required)>': uninitialized constant Spree::Core (NameError) from /gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:inblock in load_paths'

And also, you seem to have switched your email_sender_controller.rb from class EmailSenderController to Spree::EmailSenderController. That is causing the spree_affiliate extension to break.

Cheers!

Error "should not use the `match` method in your router without specifying an HTTP method"

I get an error from rails s when I include spree_email_to_friend in my Gemfile

My Gemfile includes:

gem 'rails', '4.0.1'

gem 'spree_email_to_friend', github: 'spree/spree_email_to_friend', :branch => '2-1-stable'

gem 'spree', '2.1.1'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-1-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-1-stable'

Here is the error.

Jasons-MacBook-Pro:shopsite jasonr$ rails s
=> Booting WEBrick
=> Rails 4.0.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/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 /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:67:in `initialize'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1443:in `new'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1443:in `add_route'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1422:in `decomposed_match'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1403:in `block in match'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1394:in `each'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:1394:in `match'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/bundler/gems/spree_email_to_friend-3723c9ee90bf/config/routes.rb:3:in `block in <top (required)>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:514:in `instance_exec'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:514:in `block in with_default_scope'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:723:in `scope'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/mapper.rb:513:in `with_default_scope'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:339:in `eval_block'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:356:in `block in clear!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:356:in `each'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:356:in `clear!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application/routes_reloader.rb:35:in `block in clear!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application/routes_reloader.rb:33:in `each'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application/routes_reloader.rb:33:in `clear!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application/routes_reloader.rb:15:in `reload!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/spree_backend-2.1.1/lib/spree/backend/engine.rb:15:in `block in <class:Engine>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:36:in `call'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:180:in `each'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
    from /Users/jasonr/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/jasonr/Projects/shopsite/config/environment.rb:5:in `<top (required)>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
    from /Users/jasonr/Projects/shopsite/config.ru:3:in `block in <main>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    from /Users/jasonr/Projects/shopsite/config.ru:in `new'
    from /Users/jasonr/Projects/shopsite/config.ru:in `<main>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
    from /Users/jasonr/.rvm/gems/ruby-2.0.0-p195@shopsite/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

When I remove spree_email_to_friend from my Gemfile and run bundle the error is gone and I can successfully run rails s.

Bundle install not passing

Hey guys, wanted to make a small fix to your repository unfortunately due to gemfile dependency problems i'm not able to proceed with bundle install

A comprehensive list of steps to reproduce the issue:

  1. Clone the repository
  2. Create new rvm gemset rvm use --create ruby-2.2.2@spree_email
  3. Run bundle install

What i'm expecting to happen:
Download all necessary gems and install them

What is happening:

Bundler could not find compatible versions for gem "rspec-mocks":
  In Gemfile:
    rspec-rails (~> 3.2.0) ruby depends on
      rspec-mocks (~> 3.2.0) ruby

    guard-rspec (>= 4.3.1) ruby depends on
      rspec (< 4.0, >= 2.99.0) ruby depends on
        rspec-mocks (~> 3.3.0) ruby
Bundler could not find compatible versions for gem "sass":
  In Gemfile:
    spree (>= 0) ruby depends on
      spree_frontend (= 3.1.0.beta) ruby depends on
        bootstrap-sass (~> 3.3.1) ruby depends on
          sass (>= 3.3.0) ruby

    sass-rails (~> 4.0.0) ruby depends on
      sass (~> 3.2.0) ruby
Bundler could not find compatible versions for gem "sprockets-rails":
  In Gemfile:
    spree (>= 0) ruby depends on
      spree_frontend (= 3.1.0.beta) ruby depends on
        sprockets-rails (~> 2.2) ruby

    spree (>= 0) ruby depends on
      spree_frontend (= 3.1.0.beta) ruby depends on
        sprockets-rails (~> 2.2) ruby

    spree (>= 0) ruby depends on
      spree_core (= 3.1.0.beta) ruby depends on
        rails (~> 4.2.2) ruby depends on
          sprockets-rails (>= 0) ruby

    sass-rails (~> 4.0.0) ruby depends on
      sprockets-rails (~> 2.0.0) ruby

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.