Rails 安装 ruby-china 源码,出问题,求教

LionGG · November 29, 2011 · Last by xds2000 replied at February 04, 2012 · 3425 hits

在执行 rake assets:precompile 的时候发生错误如下:

:public is no longer used to avoid overloading Module#public, use :public_folder instead from /home/map/.rvm/gems/ruby-1.9.2-p290/gems/resque-1.19.0/lib/resque/server.rb:12:in `class:Server' /home/map/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /home/map/.rvm/gems/ruby-1.9.2-p290/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets

Google 了下好像和 Sinatra 有关,但还是没解决,搞不太清楚。

问题解决了,由于 sinatra 的 API 发生变化, :public 变为 :public_folder,而相关的 resque 没来得及更新。 解决办法 1:降低 sinatra 的版本. 解决办法 2:直接更改/home/map/.rvm/gems/ruby-1.9.2-p290/gems/resque-1.19.0/lib/resque/server.rb 的第 12 行,把 :public 变为 :public_folder。

#1 楼 @LionGG 看上去兄台似乎没有用到 RVM 的精髓-Gemsets 啊。 http://beginrescueend.com/rvm/best-practices/ 每个项目一个 gemset,非常方便…

#2 楼 @southwolf 每个项目 bundle install --path vendor (or anywhere) 不是更方便?gemset 多了也很混乱的 ;-)

使用了 bundler 就不需要 gemset 了呀 gemset 主要用于 Rails2

bundler 真是一个好架构,rvm 去掉 gemset 不就是 rbenv 吗。哈哈

You need to Sign in before reply, if you don't have an account, please Sign up first.