这是我在stackoverflow中的第一个问题,所以如果我做错了,请接受我的道歉.我还有很多英语需要改进.
我正在按照github说明安装Spree
$gem install spree$rails new my_store$spree install my_store
当我收到这条消息时
…
admin Password [spree123] gemfile spreegemfile spree_usa_epaygemfile spree_skrill run bundle install from "./my_store"git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`precompiling assetsgit://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
…
好吧,正如指南建议的那样,在循环依赖问题的情况下:
$gem install spree_cmd$spree install my_store -Agemfile spreegemfile spree_usa_epaygemfile spree_skrill run bundle install from "./my_store"git://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`precompiling assetsgit://github.com/spree/spree_usa_epay.git (at 0cb57b4) is not checked out. Please run `bundle install`
我将目录更改为应用程序并运行命令:
$cd my_store$bundle install
我收到以下错误
Bundler Could not find compatible versions for gem "rails":In Gemfile:spree_usa_epay (>= 0) ruby depends on rails (<= 3.1.3,>= 3.1.1) rubyrails (3.2.1)
在此之后,我更改了gem文件以使用rails 3.1.3和coffeescript gems,并再次重复整个过程,我得到了这个.
Users/Snake/.rvm/gems/ruby-1.9.3-p0/gems/activerecord- 3.1.3/lib/active_record/base.rb:1088:in `method_missing': undefined method `mass_assignment_sanitizer=' for ActiveRecord::Base:Class (NoMethodError)from /Users/Snake/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.1.3/lib/active_record/railtIE.rb:59:in `block (3 levels) in <class:RailtIE>'
它认为它可能是一个版本的rails狂欢,但我不知道是开始.
以前有人有这个问题吗?
我运行的是Mac OS X 10.5.8
轨道3.2.1
ruby 1.9.3p0(2011-10-30修订版33570)[i386-darwin9.8.0]
ImageMagick @ 6.7.4-6_0 q16
解决方法 由于@Anatoly Ruchka建议问题是使用rails 3.2.1,所以我切换到3.1.3.这就是我所做的,我找到了@vonconrad的帖子,在那里他解释了如何在不触及安装的情况下创建铁路项目.
1)我为我的项目创建了一个目录文件夹:
$mkdir old_rails313$cd old_rails313$touch gemfile$nano gemfile
2)
我粘贴了一个gemfile定义,指定你提到我想要的rails版本,所以它看起来像这样
source 'http://rubygems.org'gem 'rails','3.1.3'gem 'sqlite3'group :assets do gem 'sass-rails','~> 3.1.5' gem 'coffee-rails','~> 3.1.1' gem 'uglifIEr','>= 1.0.3'endgem 'jquery-rails'gem "rspec-rails",">= 2.8.0.rc1",:group => [:development,:test]gem "factory_girl_rails",">= 1.4.0",:group => :testgem "cucumber-rails",">= 1.2.0",:group => :testgem "capybara",">= 1.1.2",:group => :testgem "database_cleaner",">= 0.7.0",:group => :testgem "launchy",">= 2.0.5",:group => :test#gem "devise",">= 1.5.0"gem 'spree','1.0.0'
3)然后我跑
bundle installbundle exec rails new .rails g spree:installrails s
安装后我和gem’spree’,’1.0.0’发生冲突,所以我发表评论.
我也收到了警告,但它有效:
[DEPRECATION WARNING] nested I18n namespace lookup under "activerecord.attributes.spree/order" is no longer supported
非常感谢
总结以上是内存溢出为你收集整理的ruby-on-rails-3 – spree install undefined方法mass_assignment_sanitizer全部内容,希望文章能够帮你解决ruby-on-rails-3 – spree install undefined方法mass_assignment_sanitizer所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)