Hi, I am having trouble making a simple app work on heroku and I am pretty sure that I'm missing something fundamental as this is a beginner project. I started it twice, abandoning version 1 as I wanted a pure sequel based app.
=== version 1 Started with activerecord and switched to sequel later. Push to heroku went without a glith. --- http://rosenfeld.herokuapp.com/en/articles/2012-04-18-getting-started-with-sequel-in-rails === version 2 - https://github.com/toraritte/megapocalypse === Started with "rails new name --skip-active-record --database=postgresql" Not using any sequel-rails gems and parsing "database.yml" with YAML.load. Not using any sequel-rails gems. --- https://groups.google.com/forum/#!topic/sequel-talk/MGhcXoeGzfM --- http://stackoverflow.com/questions/1236317/sequel-in-conjunction-with-activerecord-any-gotchas Everything works like a charm until pushing to heroku. The first error is thrown because heroku generates "database.yml.erb", this got solved with help from: --- http://stackoverflow.com/questions/18139003/how-to-solve-an-error-in-herokus-config-database-yml-file-mapping-values-are-n Now using: config = YAML.load(ERB.new(File.read(File.join(Rails.root,"config/database.yml"))).result)[Rails.env] Development environment still ok but now getting the error while pushing to heroku: * Running: rake assets:precompile * rake aborted! * LoadError: cannot load such file -- sequel/adapters/postgresql # or sometimes simply "sequel/adapters" After reading some online materials (heroku docs and stack) I think I understand how heroku handles database.yml but could not figure out this issue yet. --- http://stackoverflow.com/questions/7351915/database-connection-on-heroku --- https://devcenter.heroku.com/articles/config-vars --- http://stackoverflow.com/questions/12379530/heroku-what-does-writing-config-database-yml-to-read-from-database-url-mean --- http://stackoverflow.com/questions/6116503/sequel-trying-to-use-postgresql-instead-of-postgres-as-adapters According to the guides.rubyonrails.org and https://groups.google.com/forum/#!searchin/sequel-talk/rails/sequel-talk/yltdG02iBek/YUysmcUW1UcJ the sequel setup is ok in the initializer/ dir. After setting up connection with a simple options hash heroku compiles, sequel migrations go through but of course the connection is initialized with the wrong info. On heroku console: >Sequel::Model.db.test_connection Sequel::DatabaseConnectionError: PG::ConnectionBad: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? > DB = Sequel::Model.db = Sequel.connect <connetionURL> > Sequel::Model.db.test_connection => true > Story.all # one of the models Sequel::DatabaseConnectionError: PG::ConnectionBad: could not connect to server: No such file or directory I'm sorry for the long description, I guess at least I summarized my frustrating attempts for myself too. Thanks for any tip. Attila -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/groups/opt_out.
