Installing discourse heroku db:migrate error


(Kevin Krolicki) #1

I have been trying to install discourse on my local using the following guide https://github.com/discourse/discourse/blob/master/docs/install-HEROKU.md .

I got to the step of “heroku run rake db:migrate db:seed_fu” and get this error:

 "rake aborted!
(eval):1: syntax error, unexpected tFLOAT, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
define_singleton_method :54.243.253.145 do
                               ^
(eval):1: no .<digit> floating literal anymore; put 0 before dot
define_singleton_method :54.243.253.145 do
                                ^
/app/lib/site_setting_extension.rb:236:in `eval'
/app/lib/site_setting_extension.rb:236:in `setup_methods'
/app/lib/site_setting_extension.rb:111:in `block (2 levels) in refresh!'
/app/lib/site_setting_extension.rb:110:in `each'
/app/lib/site_setting_extension.rb:110:in `block in refresh!'
/app/lib/site_setting_extension.rb:97:in `synchronize'
/app/lib/site_setting_extension.rb:97:in `refresh!'
/app/config/initializers/05-site_settings.rb:3:in `block in <top (required)>'
/app/vendor/gems/rails_multisite/lib/rails_multisite/connection_management.rb:30:in `block in each_connection'
/app/vendor/gems/rails_multisite/lib/rails_multisite/connection_management.rb:28:in `each'
/app/vendor/gems/rails_multisite/lib/rails_multisite/connection_management.rb:28:in `each_connection'
/app/config/initializers/05-site_settings.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => db:migrate => environment"

I can't find anything on the web regarding this error. I have tried going into that file and just put the ip address as a string (not sure if that is what I am supposed to do) , but then I get another error 

rake aborted!
undefined method `enable_long_polling' for #<Class:0x007faf157a1e78>
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.12/lib/active_record/dynamic_matchers.rb:55:in `method_missing'
/app/config/initializers/04-message_bus.rb:26:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Tasks: TOP => db:migrate => environment

Did not know where to go from there, I need help.

Thank you


(Jens Maier) #2

Did you modify site_settings.yml?

If yes: Don’t do that. Copy discourse_defaults.conf to discourse.conf and edit that file. You can edit the site settings via the admin interface later, once Discourse is up and running and you’ve registered your admin user.


(Kevin Krolicki) #3

I have tried editing that file but I believe it is irrelevant to my problem. According the the guide that I have posted above, I cloned the heroku app in the discourse folder and then went into the app folder and continued configuring according to the guide. I am guessing that my problem has to do something with the heroku app but just cannot figure out how to fix this.


(Jens Maier) #4

So, did you in fact edit site_settings.yml? Did you undo your changes and revert it back to its original state? I leafed through the guide but found no references to going “into the app folder” and editing any files.

Anyways, deploying on Heroku is (officially) unsupported. You might want to try this guide instead:
https://meta.discourse.org/t/beginners-guide-to-deploy-discourse-on-digital-ocean-using-docker/12156?source_topic_id=17620


Why was I notified about a linked post?