对不起,如果这是一个愚蠢的问题,但问题很简单。如果我这样做,
$ rails new testproj
$ cd testporj
$ rails plugin install git://github.com/technoweenie/attachment_fu.git
应该创建一个空项目并在其中安装attachment_fu。但是,试着启动它:
$ rails s
=> Booting WEBrick
=> Rails 3.2.2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
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 conf
ig/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails
-3-2-0-rc2-has-been-released. (called from <top (required)> at c:/Users/fgadotti/rails/apps/blobtest/testproj/confi
g/environment.rb:5)
Exiting
哎呀?我错过了什么?
在我安装的Windows上是rails 3.2.2。
感谢,
答案 0 :(得分:1)
plugin install
。
现在首选Gems,它们会添加到应用程序根目录中的Gemfile
并随bundle install
一起安装
attachment_fu对rails 3的支持不是很好,我会改用carrierwave。您可以使用Rmagick的to_blob方法将图像存储在数据库中。
答案 1 :(得分:0)
就像错误表明需要一个新的rails版本一样:
确保将gemfile添加到最新版本并运行
rake rails:update
这也是警告建议您需要将您的依赖项移出供应商并将它们放入您的gemfile然后运行的一件事:
bundle install