我正在制作一个狂欢应用程序并跟随他们的github和他们的网站。我想看看'狂欢',所以我安装了它并按照github页面上的说明进行操作。当我运行bundle exec rails g spree_fancy:install
时,我收到错误;
/Users/me/my-project/vendor/bundle/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:98:in
为BinRead“: No such file or directory @ rb_sysopen - /Users/me/myproject/vendor/assets/javascripts/spree/frontend/all.js (Errno::ENOENT)
这是我的Gemfile的样子
的Gemfile
source 'https://rubygems.org'
ruby '2.1.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spree', '2.4.0'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '2-4-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-4-stable'
gem 'spree_fancy', :github => 'spree/spree_fancy', branch: '2-2-stable'
我已经按照Spree Docs所说的去做了,但它并没有为我工作。如果这意味着它可以工作,我可以尝试不同版本的狂欢,但我不确定哪个版本适用于狂欢幻想。
我也遵循狂欢github指南,该指南说使用新版本的rails。我安装了rails 4.2.0
,但它没有使用spree gem,所以我回到了rails 4.1.8
。
非常感谢任何帮助。
答案 0 :(得分:0)
看来,Spree版本(2.4.0)不包含frontend / all.js(css)文件。 https://github.com/spree/spree/tree/2-4-stable/frontend/app/assets/javascripts/spree/frontend https://github.com/spree/spree/tree/2-4-stable/frontend/app/assets/stylesheets/spree/frontend
似乎使用frontend.js(css)应该可以工作:
# app/assets/javascripts/application.js
//= require 'frontend'
和
# app/assets/stylesheets/application.css
/*= require 'frontend' */