当我关注Spree Guides时,收到错误消息
yulong@ubuntu:~/mystore$ rake db:create
rake db:create
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
rake aborted!
Fixtures is not a class
yulong@ubuntu:~/mystore$ rails g spree:site
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/yulong/mystore/config/application.rb:7)
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.attributes.checkout" is no longer supported
create lib/spree_site.rb
remove public/index.html
append public/robots.txt
append db/seeds.rb
答案 0 :(得分:4)
请通过以下链接,这将帮助您解决rails 3.1
中的此问题http://martinciu.com/2011/07/difference-between-class_inheritable_attribute-and-class_attribute.html