2
捆绑安装是绿色的,但是当我运行“rake”时,我得到以下:使用链轮2.0(可以使用2.0.0.beta.15)的未定义方法与迈克尔哈特尔的Rails教程的Rails 3.1.0.rc5 sample_app项目
rake aborted! undefined method `static_root=' for
#<Sprockets::Environment:0x16b6b78> ... Tasks: TOP => default => spec
=> db:test:prepare => db:abort_if_pending_migrations => environment
(See full trace by running task with --trace)
如果我添加 “宝石 '链轮', '2.0.0.beta.15'” 到Gemfile中并重新打包并重新耙。一切正常。
请运行该命令它的结束。我怀疑你仍然在运行一个老版本的Rails,它试图使用'static_root ='方法,而这个方法在这个最终版本中是不可用的。 –
如果我使用rails 3.1.0.rc8和sprockets 2.0.0,但仍然在sqlite3和sqlite3-ruby 1.3.3下,我得到这个:'rake aborted! 请安装sqlite3适配器:'gem install activerecord-sqlite3-adapter'(不能激活sqlite3(〜> 1.3.4),已经激活sqlite3-1.3.3。确保所有的依赖关系都添加到Gemfile中。)' – jasnow
代码演示这个问题:https://github.com/jasnow/sample_app_3_1 – jasnow