嗨,我是一個開發rails應用程序的新手,我有興趣 使用'狂歡'爲我的電子商務網站。狂潮發電機不工作時,類型'rails g spree網站'
我下面這個教程大禮包從這個網站 http://guides.spreecommerce.com/getting_started.html
我做了一個新的安裝爲上面的教程指導我。我使用rails 1.9.3和mysql 數據庫將其作爲'5.1啓動Spree'的一部分。一切都很好,直到我注意到登錄欄不是像教程那樣出現 。
我做了一些研究,害得我到這個解決方案中 https://github.com/railsdog/deface/issues/12 我從這篇文章中瞭解,似乎問題使用Ruby 1.9.3, 當來自從污損寶石一個「錯誤」,但問題不會出現在1.9.2中,因此我將ruby 版本更改爲1.9.2以試用它。
在我安裝了ruby 1.9.2後,我安裝了'spree'gem,我重複了'入門 教程'中的項目(使用mysql數據庫)來完成教程。
現在在部分4.4.2,其中i型 '耙分貝:創建' 端子輸出本
商店$耙分貝:創建
store_test已經存在
store_development已經存在當我試着通過'rails g spree:site'生成狂歡網站,終端給我這個錯誤
store rails g spree:site create config/spree.yml /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/spree_core-0.70.2/lib/generators/spree/site/site_generator.rb:16:in `block in config_spree_yml': undefined method `version' for Spree:Module (NoMethodError) from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in `call' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:54:in `render' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in `block (2 levels) in invoke!' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in `open' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:63:in `block in invoke!' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `call' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/empty_directory.rb:114:in `invoke_with_conflict_check' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:61:in `invoke!' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions.rb:95:in `action' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/actions/create_file.rb:26:in `create_file' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/spree_core-0.70.2/lib/generators/spree/site/site_generator.rb:15:in `config_spree_yml' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in `run' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in `start' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/rails/generators.rb:168:in `invoke' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/strong textrails/commands/generate.rb:12:in `<top (required)>' from /Usestrong textrs/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `block in require' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `block in load_dependency' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:640:in `new_constants_in' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:223:in `load_dependency' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:240:in `require' from /Users/macbookpro/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.2/lib/rails/commands.rb:28:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>'
我很迷惑,因爲我沒有之前創建一個數據庫(但它顯示出它的存在)。而現在我甚至不能生成 狂歡網站。我研究了這個問題幾天,我還沒有找到一個 匹配解決方案。這是我的Gemfile看起來像
源「http://rubygems.org」
gem 'rails', '3.1.2' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'mysql2' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.1.5.rc.2' gem 'coffee-rails', '~> 3.1.1' gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'ruby-debug19', :require => 'ruby-debug' group :test do # Pretty printed test output gem 'turn', '0.8.2', :require => false gem 'spree' , '0.70.2' end
我真的很感激,如果有人可以給我一些指點或解決我的問題。我現在很迷茫,它肯定會讓 有人開心。 (告訴我,如果u需要我的紅寶石更多信息 環境)
是否需要運行0.70版本?你應該全光照如果可能的話,最新的。您上面鏈接的說明適用於比最新版稍早的版本(只有delta是最新的版本需要3.2.9)。您似乎沒有遵循這些說明,因此您至少需要更正您的0.70入門文檔的鏈接。 –