设置狂欢时出错

时间:2016-10-19 16:52:02

标签: ruby-on-rails ruby spree

我使用此命令创建了一个新的rails应用程序:

rails new store

rails版本是:4.2.6

Ruby版本:

$ rvm rubies
ruby-2.1.2 [ x86_64 ]
ruby-2.2.0 [ x86_64 ]
=* ruby-2.2.2 [ x86_64 ]`

当我尝试时:

spree install .

我收到以下错误:

[WARNING] Spree CMD Installer is deprecated. Please follow installation instructions at https://github.com/spree/spree#getting-started
Would you like to install the default gateways? (Recommended) (yes/no) [yes] yes
Would you like to install the default authentication system? (yes/no) [yes] yes
Would you like to run the migrations? (yes/no) [yes] yes
Would you like to load the seed data? (yes/no) [yes] yes
Would you like to load the sample data? (yes/no) [yes] yes
     gemfile  spree
     gemfile  spree_gateway
     gemfile  spree_auth_devise
         run  bundle install from "."
/Users/saurabh.mimani/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler (LoadError)
    from /Users/saurabh.mimani/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/saurabh.mimani/work/codes/spree/store/bin/spring:8:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

我还尝试按getting started页面中的说明进行安装,但是我得到了一些其他错误,其中描述了here

2 个答案:

答案 0 :(得分:0)

Spree需要安装bundler。请先用

安装
gem install bundler

也就是说,使用新的Spree项目,您应该遵循命令行工具的警告并以推荐的方式设置新的Spree项目。这在https://github.com/spree/spree#getting-started

上的链接页面上进行了描述

答案 1 :(得分:0)

我弄清楚问题是什么:

我必须使用以下命令创建一个带有4.2.6版本rails的rails应用程序:

rails _4.2.6_ new store

当我刚刚运行rails new store时,它曾经使用rails 5版本来创建依赖项,而这种版本正在破坏狂欢。