I have a Sinatra app that uses Activerecord gem. Everything used to run well until some moment my code just stopped working. The only thing that I did in between is update my Gemfile with bundle update
.
Now this code:
require 'sinatra'
require 'sinatra/activerecord'
set :database_file, "../../config/database.yml"
raises /home/username/.rvm/gems/ruby-2.1.5/gems/sinatra-activerecord-2.0.3/lib/sinatra/activerecord.rb:32:in database_file=: private method 'load' called for Psych:Module (NoMethodError) .
I tried to rollback to previous Gemfile.lock version, but error persisits.
What should be my next steps?
Setting
set :database, {adapter: 'postgresql', database: '_your_database_name_'
}
instead of
set :database_file, "../../config/database.yml"
helps, but I'm still not sure where the bug came from.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.