2016-08-04 21 views
1

寶石大禮包並不在Rails的5寶石大禮包不Rails的工作,5

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at C:/Users/Sergey/spree/config/application.rb:7) 
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'spree'. (Bundler::GemRequireError) 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require' 
     from C:/Users/Sergey/spree/config/application.rb:7:in `<top (required)>' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!' 
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>' 
     from bin/rails:4:in `require' 
     from bin/rails:4:in `<main>' 

我已經加入的Gemfile「大禮包」寶石工作。

+0

你的問題是什麼? – sevenseacat

+0

如何修復該錯誤 –

+0

據我所知,spree 3.1支持rails <4.2.x only – user1201917

回答

1

現在大禮包不可用於軌道5.0,所以如果你想使用它,你必須去鋼軌4.2.6(至少)

+0

若要創建使用舊版rails的項目,只需鍵入: rails _4.2.6_ new MyAppName –

2

您可以使用最前沿的版本,按照大禮包的自述:

寶石 '大禮包',github上: '大禮包/大禮包'

寶石 'spree_auth_devise',github上: '大禮包/ spree_auth_devise'

寶石 'spree_gateway',github上:「大禮包/ spree_gateway'

https://github.com/spree/spree

0

添加施普雷寶石,你的Gemfile:

Rails的5:

gem 'spree', '~> 3.2.0.rc1' 

gem 'spree_auth_devise', '~> 3.2.0.beta' 

gem 'spree_gateway', '~> 3.2.0.beta' 
0

我使用Ruby 2.4.0和Rails 5.0.3

將具有特定版本的寶石添加到Gemfile中。

gem 'spree', '~> 3.2.0' 
gem 'spree_auth_devise', '~> 3.2.0.beta' 
gem 'spree_gateway', '~> 3.2.0.beta' 

後,嘗試安裝以下發電機設置狂歡:

rails g spree:install --user_class=Spree::User 
rails g spree:auth:install 
rails g spree_gateway:install 

這是爲我工作。讓我知道任何問題。