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'

你可能感兴趣的:(jquery,PHP,css,git,Rails)