1. 从http://rubyinstaller.org/downloads/下载ruby, 我们使用1.9作为例子
2. 同时,下载对应的devkit,这里是
2. 安装ruby结束后,解压devkit,进入目录运行ruby dk.rb install
http://stackoverflow.com/questions/17499946/rails-installtion-error-the-atomic-native-gem-requires-installed-build-tools
解决atomic安装失败的方法
http://stefanuswiely.blogspot.com/
:\> REG DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun
3. 之后使用gem install rails就可以了
4. 如果希望使用ri, 而又碰到了没有的情况,follow以下步骤
gem install rdoc-data
# Regenerate system docs
rdoc-data --install
# Regenerate all gem docs
gem rdoc --all --overwrite
# Regenerate specific gem doc with specific version, optional
gem rdoc gemname -v 1.2.3 --overwrite
5.使用open shift 部署ror
http://www.lovelucy.info/redhat-openshift-trial-review.html
http://www.nishizhen.cn/2012/01/%E5%9C%A8openshift%E4%B8%AD%E9%83%A8%E7%BD%B2ror%E5%BA%94%E7%94%A8/
6. 使用Heroku部署
http://chunchu.org/code/2012/03/31/2004.html
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-rails_server
https://dashboard.heroku.com/apps
https://devcenter.heroku.com/categories/ruby
https://devcenter.heroku.com/articles/getting-started-with-rails4
常见问题:
http://stackoverflow.com/questions/6853046/error-installing-sqlite3-gem-via-bundler
https://www.ruby-forum.com/topic/4415126
cant-push-app-heroku-failed-to-install-gems-via-bundler
http://stackoverflow.com/questions/9009278/cant-push-app-heroku-failed-to-install-gems-via-bundler
undefined-method-visit-when-using-rspec-and-capybara-in-rails
http://stackoverflow.com/questions/15148585/undefined-method-visit-when-using-rspec-and-capybara-in-rails
push 代码到Heroku
http://ruby-china.org/topics/10813
Fix installation issue of bcrypt-ruby
http://stackoverflow.com/questions/18541062/issues-using-bcrypt-3-0-1-with-ruby2-0-on-windows
Fix dropdown menu not works issue(8.25)
http://stackoverflow.com/questions/10218587/twitter-bootstrap-drop-down-suddenly-not-working
7.不错的教程
http://railstutorial-china.org/
http://guides.rubyonrails.org/
http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
8. 弄懂routes
http://guides.ruby-china.org/routing.html
http://www.cnblogs.com/lwm-1988/archive/2011/09/13/2174686.html<不是很好,抄袭部分占多,讲解不够详细>
9. MarkDown page
http://daringfireball.net/projects/markdown/
https://help.github.com/articles/github-flavored-markdown
http://stackoverflow.com/questions/10240125/working-with-readme-md-on-github-com
Ext. How to learn ROR
http://edwinmeyer.com/Integrated_RHG.html
先搞懂Rails的路由模式
posts GET /posts(.:format) {:controller= > "posts", :action= > "index"}
POST /posts(.:format) {:controller= > "posts", :action= > "create"}
new_post GET /posts/new(.:format) {:controller= > "posts", :action= > "new"}
edit_post GET /posts/:id/edit(.:format) {:controller= > "posts", :action= > "edit"}
post GET /posts/:id(.:format) {:controller= > "posts", :action= > "show"}
PUT /posts/:id(.:format) {:controller= > "posts", :action= > "update"}
DELETE /posts/:id(.:format) {:controller= > "posts", :action= > "destroy"}
通过rake routes你可以得到类似上面的路由记录,这样你就明白rails是如何通过路由来调用MVC里的C-controller里的方法了;然后再看看MVC里的M-model还有数据库迁移部分,剩下就是V-view了,重点是如何和javascript打交道的,Rails3和之前的版本都有不同。完成了这些就算入门了,然后就是逛github和http://railsplugins.org这样的网站,了解下各个方面的插件。ps: Bundler实在是很方便。
10. bootstrap for rails
http://railsapps.github.io/twitter-bootstrap-rails.html
https://tutorials.railsapps.org/rails-bootstrap
11. 安装配置MySQL
Follow下面这篇文章。基本上是需要安装一个MySQL Connector
然后把几个对应的.dll文件拷贝到ruby对应的lib目录下
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
12 Ruby on windows
http://rubyonwindowsguides.github.io/book/ch04-01.html
http://stackoverflow.com/questions/8200066/error-installing-mysql2-with-windows-7-x64-does-not-work
If not works, then you have to choose proper version of MySQL and Ruby (including system arch version)
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
To be resolved:
1. How to make bootstrap work in Rails app on Heroku could service?? Downgrade?