Skip to content

rake db:seed或者db:seed:development:shop 报错 #459

Closed
wyh770406 opened this Issue Jul 27, 2012 · 11 comments

2 participants

@wyh770406

请教以下问题如何解决?

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActiveAdmin::Settings instead. (called from at /home/wyh77/shopqi/config/application.rb:9)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in Kaminari::ActiveRecordRelationMethods instead. (called from at /home/wyh77/shopqi/config/application.rb:9)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in Kaminari::PageScopeMethods instead. (called from at /home/wyh77/shopqi/config/application.rb:9)
/usr/share/ruby-rvm/gems/ruby-1.9.2-p290/gems/bundler-1.1.3/lib/bundler.rb:255: warning: Insecure world writable dir /usr/share/ruby-rvm/rubies/ruby-1.9.2-p290/bin in PATH, mode 040777
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from at /home/wyh77/shopqi/Rakefile:52)
rake aborted!
undefined method `remove_previously_stored_files_after_update' for #File:0x00000009e13f58

Tasks: TOP => db:seed => db:seed:development => db:seed:development:shop
(See full trace by running task with --trace)

@saberma
Owner
saberma commented Jul 27, 2012

已解决,我正在尝试升级至 rails3.2.6,所以问题和 Warning 会多一些,正在处理。

@saberma
Owner
saberma commented Jul 27, 2012

另外,第一次使用的时候不用运行 rake db:seed,只要运行 bundle exec rake shopqi:bootstrap 就可以了

@wyh770406

我用的是mysql,没有用postgresql,
提示Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)

Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create

@wyh770406

bundle exec rake shopqi:bootstrap 里面必须要postgresql?

@wyh770406

这个文件的配置已经改成mysql database.yml

@wyh770406

我用rake db:migrate没有问题

@saberma
Owner
saberma commented Jul 29, 2012

是升级 rails3.2.6 后引起的问题,已经通过更新 kaminari 解决了。

你可以使用 MySQL。

@wyh770406

我刚才更新了最新代码,然后bundle exec rake shopqi:bootstrap,还是报错如下:
rake aborted!
Please install the postgresql adapter: gem install activerecord-postgresql-adapter (pg is not part of the bundle. Add it to Gemfile.)

Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create
(See full trace by running task with --trace)

@wyh770406

我用postgresql数据库没有问题,感谢你做了这么好的一个产品!:-)

@wyh770406 wyh770406 closed this Jul 30, 2012
@saberma saberma was assigned Jul 30, 2012
@saberma
Owner
saberma commented Jul 30, 2012

@wyh770406 这个问题是因为 database.yml 仍然使用的是 PostgreSQL的配置,现在已经更新代码,以支持 MySQL

你可以运行以下命令初始化 MySQL 数据库

$ script/development/use_mysql
$ bundle
$ bundle exec rake "shopqi:bootstrap[mysql]"
@wyh770406

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.