rails3.2 开发过程中的一些总结

1, Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
update Gemfile文件
gem 'execjs'
gem 'therubyracer'

bundle install

2, 
can't convert Fixnum into String
这是Mysql2的问题,将配置文件中的password: "123456"

3,  rails 3.1 以前的版本,压缩js 和 css 使用 jammit
http://documentcloud.github.com/jammit/
rails3.1 以后的版本, 使用assets

4,  使用erb的时候,<%%>不想换行,可以使用 <%-  -%>

5,  rails3.2 集成 haml, 如何做?
gem 'haml', '3.1.4'
gem 'haml-rails'

bundle install

6, 如何整合bootstrap
参考:https://github.com/seyhunak/twitter-bootstrap-rails
6.1安装最新的twitter-bootstrap-rails
gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'
6.2
bundle install
6.3
rails g bootstrap:install
rails g bootstrap:layout application fixed

主题套用
rails g scaffold post title:string description:text
rake db:migrate
rails g bootstrap:themed posts



你可能感兴趣的:(JavaScript,mysql,String,layout,application,Rails)