Problems with installing discourse on heroku(mostly a redis error)

I am able to run discourse forum applications
locally on ubuntu 14.04 without any problems. Now I am trying to make it
work on Heroku. I am stuck.
I am using Mandrill starter for emails, rediscloud:25 as addons.

Here is what I did:
I added mandrill details and hostname in
discourse_quickstart.conf, I added redis host url which I got from
rediscloud. I gitignored config/discourse.conf file.

Also I am not sure on “what to do/how to set” the following commands since I am using rediscloud

heroku config:get OPENREDIS_URL
heroku config:set REDIS_PROVIDER_URL=<result of above command>
heroku config:set DISCOURSE_REDIS_HOST=<host from above command>
heroku config:set DISCOURSE_REDIS_PORT=<port from above command>
heroku config:set DISCOURSE_REDIS_PASSWORD=<password from your provider>
heroku config:set DISCOURSE_REDIS_DB=<dbname from your provider>

I have the following error. Please help

Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        fatal: Not a git repository (or any parent up to mount point /tmp)
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
remote:        URGENT: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) Failed to initialize site default
remote:        rake aborted!
remote:        Redis::CannotConnectError: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:331:in rescue in establish_connection'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:317:inestablish_connection'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:94:in block in connect'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:279:inwith_reconnect'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:93:in connect'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:350:inensure_connected'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:207:in block in process'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:292:inlogging'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:206:in process'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis/client.rb:112:incall'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:789:in block in get'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:inblock in synchronize'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:37:in synchronize'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/redis-3.2.1/lib/redis.rb:788:inget'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/lib/discourse_redis.rb:83:in block (3 levels) in <class:DiscourseRedis>'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/lib/discourse_redis.rb:51:inignore_readonly'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/lib/discourse_redis.rb:83:in block (2 levels) in <class:DiscourseRedis>'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/config/initializers/secret_token.rb:6:in'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:in
 load'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:inblock in load'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in
 load_dependency'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:241:inload'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/engine.rb:648:in
 block in load_config_initializer'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:161:ininstrument'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/engine.rb:647:in
 load_config_initializer'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/engine.rb:612:inblock (2 levels) in '
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/engine.rb:611:in
 each'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/engine.rb:611:inblock in '
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:30:in
 instance_exec'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:30:inrun'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:55:in
 block in run_initializers'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:44:ineach'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:44:in
 tsort_each_child'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/initializable.rb:54:inrun_initializers'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/application.rb:300:in
 initialize!'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/railtie.rb:194:inpublic_send'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/railtie.rb:194:in
 method_missing'
remote:        /tmp/build_5a582688a3401aad01b654d776f55dd5/config/environment.rb:5:in'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in
 require'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:inblock in require'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:232:in
 load_dependency'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:inrequire'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/application.rb:276:in
 require_environment!'
remote:        
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/railties-4.1.9/lib/rails/application.rb:405:inblock in run_tasks_blocks'
remote:       
 
/tmp/build_5a582688a3401aad01b654d776f55dd5/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in
 `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy...
remote: 
remote: !    Push rejected to gjforum.
remote: 
To git@heroku.com:gjforum.git
 ! [remote rejected] heroku -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:gjforum.git'

Heroku is not a supported setup and until we figure out a properly supported mechanism of doing uploads it can not be. Use digital ocean / linode or any other vps, it is supported.

I am using a 32 bit laptop at the moment(and for another 2 months). I cannot install docker on my ubuntu system. I might need the docker set up for customizing the front end.

I shifted to heroku because I will be able to customize the front end from my laptop. I have a little experience in Rails.

It is probably a bad idea. Can you make a suggestion on this situation?

Digital Ocean at 10 bucks a month is cheaper than one beer at an Ibiza night club.

hehe :slight_smile: A new laptop costs a minimum of 1000 Dollars.

I cannot install docker on my current system. The problem is not the 10USD or the 50USD for heroku. I cannot customize the front end on my current laptop :frowning: if I use docker. Or am I wrong about it?

I cannot postpone the project until I get my new laptop.

You can set up a dev environment on x32, nothing is blocking you.

No, the system is running on a remote VPS (virtual private server), which you can use for other stuff if you want. On your computer, you’re just running a browser.

@sam I don’t think he wants a Discourse dev environment? Especially as this is in [installation].

@riking
I never used docker before.

Docker installation docs say that a 64 bit machine is needed for installing docker on any system. Installation on Digital Ocean would not be a problem like you said. If I have to customize I wouldn’t be able to do it with my 32 bit laptop because I cannot install docker on it - this would be a problem.

Is there a way where I can develop on a 32 bit laptop and deploy on Digital Ocean? That would be best.

Also, thank you guys for your quick responses!

No, only the machine where you want Docker to run must be a 64bit arch. Since your Discourse will be running on a server in a datacenter far, far away, your laptop’s arch has nothing to do with it. For a basic Discourse setup, your laptop needs

  • a good browser, I’d recommend Firefox or Chrome,
  • an SSH client, PuTTY if you’re on Windows,
  • an email client, unless you can access your emails through the web.

And that’s it. :slight_smile:

1 Like

Given your set up: How do I change the styling (a little css) of the home page of discourse and push those changes to digital ocean?

you don’t need a dev environment for that … just edit site customizations in admin.

Trying to decide between Heroku and Digital Ocean for my app deployment - I’d like Discourse to power my user forums, so if I want to avoid trouble with setting up Discourse on Heroku, I should probably just go with DO?

Its probably way simpler, the team do not support Heroku questions here, in theory you can get it working but you would be on your own.