摘要:在Gemfile文件中添加'bootstrap-sass',再运行bundle install gem 'bootstrap-sass' 在config/application.rb添加一行代码,让bootstrap-sass和asset pipeline兼容 class Application <
阅读全文
摘要:Gemfile文件添加rspec、guard和spork,之后执行bundle install命令 gem 'rb-readline' group :development, :test do # Call 'byebug' anywhere in the code to stop executio
阅读全文
摘要:参考链接:http://guides.ruby-china.org/layouts_and_rendering.html#%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90%E6%A0%87%E7%AD%BE%E5%B8%AE%E5%8A%A9%E6%96%B9%E6%B3%9...
阅读全文
摘要:参考至http://guides.rubyonrails.org/action_mailer_basics.html在gmail账户的安全里先开启两步验证(链接:https://myaccount.google.com/security),在生成一个应用专用密码,再后面需要使用。在控制台下进入到ra...
阅读全文
摘要:movies_controller.rbclass MoviesController by default end def index @all_ratings = Array.new Movie.select(:rating).distinct.each do |movie| ...
阅读全文
摘要:Cloud9网址:https://c9.io/使用github账号登陆,如果没有,现在github(https://github.com/)上注册一个用户,在进行登陆。创建workspace使用git从github上克隆并创建项目git源地址:http://cgao_rottenpotatoes-r...
阅读全文
摘要:先安装heroku,参见http://www.cnblogs.com/jecyhw/p/4906990.htmlHeroku安装之后,就自动安装上git,目录为C:\Program Files (x86)\Git(我的电脑是这个目录)打开rubymine,先在rubymine中配置git。在菜单中找...
阅读全文
摘要:创建rails工程在gemfile文件中添加:group :test do gem 'cucumber-rails', :require => false # database_cleaner is not required, but highlyrecommended gem 'database_...
阅读全文
摘要:在rubymine里新建Rails application找到Gemfile文件,按照下图添加gem ‘rspec’ 和gem ‘rspec-rails’执行bundle install找到Tools菜单里的Run rails Script运行完之后测试如下图所示,在spec下新建test目录,再在...
阅读全文
摘要:Jdk安装:官网地址http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html下载要安装的jdk版本。安装之后测试是否安装成功如果已经安装,就不需要再次安装。Jruby安装:官网地址http://jrub...
阅读全文
摘要:Ruby下载地址http://rubyinstaller.org/downloads/ (以安装2.1.7为例,2.2.3未能安装成功)安装完之后测试是否安装成功安装DevKit 下载地址http://rubyinstaller.org/downloads/选择相应版本下载,这里下载的是下载之后,解...
阅读全文