mysql - Ruby on Rails 4 select schema_migrations Error -
guy today open old ruby project after copy files sites folder run commands
bundle rake db:create rake db:migrate rails s
when open project on browser found project gives me errors because mysql not work me got error on console
activerecord::schemamigation load (68.0ms) select 'schema_migrations'.* 'schema_migrations' processing homecontroller#index html completed 500 internal server error in 92ms log writing faild. invalid byte sequence in us-ascii
so why got error , how can solve ??
i solved now
just solve us-ascii issue added line first line in model page
#encoding: utf-8
also added lines
if ruby_version =~ /1.9/ encoding.default_external = encoding::utf_8 encoding.default_internal = encoding::utf_8 end
in gemfile
then got error told me use protected_attributes
so added line
gem 'protected_attributes'
in gemfile , execute:
$ bundle
Comments
Post a Comment