简体   繁体   English

设置大礼包时出错

[英]error in setting up spree

I have create a new rails app using this command: 我使用以下命令创建了一个新的Rails应用程序:

rails new store

rails version is: 4.2.6 rails版本是:4.2.6

Ruby Version: Ruby版本:

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

When I tried : 当我尝试:

spree install .

I am getting following error: 我收到以下错误:

[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>'

I also tried to install as is given in getting started page, but than I get some other error, which is described here . 我也尝试安装在被赋予入门页面,但比我得到一些其他错误,这是描述在这里

Spree requires bundler to be installed. Spree需要安装捆绑器。 Please install it first with 请先安装

gem install bundler

That said, with a new Spree project, you should follow the warning of the command line tool and setup your new Spree project the recommended way. 也就是说,对于新的Spree项目,您应该遵循命令行工具的警告,并以建议的方式设置新的Spree项目。 This is described on the linked page on https://github.com/spree/spree#getting-started 这在https://github.com/spree/spree#getting-started的链接页面上进行了描述

I figured out what the problem was: 我发现了问题所在:

I had to create a rails app with 4.2.6 version of rails, using following command: 我必须使用以下命令使用4.2.6版本的rails创建一个rails应用程序:

rails _4.2.6_ new store

When I was just running rails new store , it used to create dependency using rails 5 version, which was breaking with spree. 当我刚运行rails new store ,它曾经使用rails 5版本创建依赖关系,而这一版本大肆狂欢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM