kandanapp / kandan

Kandan is an Open Source Alternative to HipChat
GNU Affero General Public License v3.0
2.72k stars 408 forks source link

Notes on deploy to stand alone server guide #436

Open FrankyBoy opened 9 years ago

FrankyBoy commented 9 years ago

Hi!

Notes from going through this guide on kubuntu 15.04

myuser@myuser-VirtualBox:~/kandan$ bundle exec rake db:create db:migrate kandan:bootstrap
rake aborted!
LoadError: cannot load such file -- guard/guard
/var/lib/gems/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'
/var/lib/gems/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
/var/lib/gems/2.1.0/gems/guard-spork-1.5.1/lib/guard/spork.rb:2:in `<top (required)>'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:85:in `require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:85:in `rescue in block in require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:68:in `block in require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
/home/myuser/kandan/config/application.rb:13:in `<top (required)>'
/home/myuser/kandan/Rakefile:5:in `require'
/home/myuser/kandan/Rakefile:5:in `<top (required)>'
LoadError: cannot load such file -- guard-spork
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
/var/lib/gems/2.1.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
/home/myuser/kandan/config/application.rb:13:in `<top (required)>'
/home/myuser/kandan/Rakefile:5:in `require'
/home/myuser/kandan/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
miurahr commented 9 years ago

rake with RAILS_ENV=production may help you.

FrankyBoy commented 9 years ago

@miurahr then maybe the guide should say so

scouttyg commented 9 years ago

@FrankyBoy My guess is raking with production will just skip the guard/guard process because its a gem in the development/test section of the app, so really this treats the symptom rather than the underlying cause. I think I've got a fix for this, I ran into a similar issue and should have a push to fix this shortly.

miurahr commented 9 years ago

@scouttyg The guide reffered https://github.com/kandanapp/kandan/blob/master/DEPLOY.md#standalone-server said to make configuration for production. such as

production:
  adapter: postgresql
  host: localhost

It is natural to guide adding RAILS_ENV=production

If the guide intend to lead user to prepare development/test environment, it should do so explicitly.