-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Tsutomu Kuroda edited this page Jan 13, 2017
·
11 revisions
Modify Gemfile
gem 'rails', '5.0.1'
$ bundle update
$ bin/rake db:setup
Database 'db/development.sqlite3' already exists
Database 'db/test.sqlite3' already exists
rake aborted!
ActiveRecord::NoEnvironmentInSchemaError:
Environment data not found in the schema. To resolve this issue, run:
bin/rails db:environment:set RAILS_ENV=development
Tasks: TOP => db:schema:load => db:check_protected_environments
(See full trace by running task with --trace)
$ bin/rails db:environment:set RAILS_ENV=development
$ bin/rake db:setup
Database 'db/development.sqlite3' already exists
Database 'db/test.sqlite3' already exists
-- create_table("articles", {:force=>:cascade})
-> 0.1415s
-- create_table("members", {:force=>:cascade})
-> 0.1329s
-- initialize_schema_migrations_table()
-> 0.0004s
-- create_table("articles", {:force=>:cascade})
-> 0.0722s
-- create_table("members", {:force=>:cascade})
-> 0.1088s
-- initialize_schema_migrations_table()
-> 0.0935s
Creating members...
Creating articles...
$ bin/rails test test/models/member_test.rb
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = true` instead.
$ rak serve_static_files
config/environments/test.rb
16| config.serve_static_files = true
config/environments/production.rb
25| config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
DEPRECATION WARNING: `config.static_cache_control` is deprecated and will be removed in Rails 5.1.
Please use
`config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }`
instead.
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
DEPRECATION WARNING: Using a dynamic :action segment in a route is deprecated
and will be removed in Rails 5.1.
config/routesr.b
1.upto(19) do |n|
get "lesson/step#{n}(/:name)" => "lesson#step#{n}"
end
config/application.rb
Remove this line:
config.active_record.raise_in_transactional_callbacks = true
DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated,
in favor of keyword arguments, and will be removed in Rails 5.1.