Rails 3.0 base app, with Haml + Sass, jQuery, 960.gs, Authlogic

 

http://github.com/ashleyw/Slate

 

Get started

  1. git clone git://github.com/ashleyw/Slate.git myapp
  2. cd myapp
  3. script/init
  4. rails server

1.找不到 sass 文件
ActionView::Template::Error (No such file or directory - Asset file not found at
 '/opt/rails_apps/slate/public/stylesheets/application.css'):

Sass::Plugin.options[:template_location] = "#{Rails.root}/app/styles"
解決方法:
$ rails plugin install git://github.com/koppen/hassle.git
參考:
http://mentalized.net/journal/2010/04/06/heroku_rails_3_and_sass/
http://github.com/koppen/hassle



2.登入報錯
undefined method `to_key' for #<UserSession: no credentials provided>
解決方法:
<1> fix in the model
def to_key
  self.keys.to_a
end
<2> fix in the view
= form_for(:user_session, @user_session) do |f|
參考:
http://railsforum.com/viewtopic.php?id=39220
http://stackoverflow.com/questions/2453104/mongomapper-rails3-edge-undefined-method-to-key-on-form-for

3.參數錯誤
ArgumentError (Secret should be something secure, like "b078b08976e0caee97200a700ec228dc".  The value you provided, "SECRET_TOKEN_REPLACE_ME", is shorter than the minimum length
of 30 characters):
解決方法:
$ vi config/initializers/cookie_verification_secret.rb
Rails.application.config.secret_token = 'b078b08976e0caee97200a700ec228dc'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值