首页 > 代码库 > Ruby on Rails 学习笔记 - 3 Static Page
Ruby on Rails 学习笔记 - 3 Static Page
1. Gemfile
source ‘https://rubygems.org‘gem ‘rails‘, ‘4.2.0.beta4‘gem ‘sass-rails‘, ‘5.0.0.beta1‘gem ‘uglifier‘, ‘2.5.3‘gem ‘coffee-rails‘, ‘4.0.1‘gem ‘jquery-rails‘, ‘4.0.0.beta2‘gem ‘turbolinks‘, ‘2.3.0‘gem ‘jbuilder‘, ‘2.2.3‘gem ‘rails-html-sanitizer‘, ‘1.0.1‘gem ‘sdoc‘, ‘0.4.0‘, group: :docgroup :development, :test do gem ‘sqlite3‘, ‘1.3.9‘ gem ‘byebug‘, ‘3.4.0‘ gem ‘web-console‘, ‘2.0.0.beta3‘ gem ‘spring‘, ‘1.1.3‘endgroup :test do gem ‘minitest-reporters‘, ‘1.0.5‘ gem ‘mini_backtrace‘, ‘0.1.3‘ gem ‘guard-minitest‘, ‘2.3.1‘endgroup :production do gem ‘pg‘, ‘0.17.1‘ gem ‘rails_12factor‘, ‘0.0.2‘end
$ bundle install --without production
$ bundle update
如上的配置可以在develop和test上使用SQLite(sqlite3),在production上使用PostgreSQL(pg)
2. 生成static文件
$ rails generate controller StaticPages home help
Ruby on Rails 学习笔记 - 3 Static Page
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。