foradian / fluxday

A user-friendly, free & opensource task & productivity management tool for growing startups
http://fluxday.io/
Apache License 2.0
476 stars 173 forks source link

Unable to install #7

Closed smartniazi closed 8 years ago

smartniazi commented 8 years ago

Created a new droplet on digitalocean and tried to install as mentioned but stuck on rake db:migrate command, Below is the error:

root@aim1one:/home/admin/web/aim1one.com/public_html/fluxday# rake db:migrate
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /home/admin/web/aim1one.com/public_html/fluxday/config/app_config.yml
/home/admin/web/aim1one.com/public_html/fluxday/config/environments/development.rb:1:in `<top (required)>'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/engine.rb:590:in `each'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/engine.rb:590:in `block in <class:Engine>'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `instance_exec'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `run'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:44:in `each'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:54:in `run_initializers'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/application.rb:215:in `initialize!'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/admin/web/aim1one.com/public_html/fluxday/config/environment.rb:6:in `<top (required)>'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/usr/share/rvm/gems/ruby-2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/application.rb:189:in `require_environment!'
/usr/share/rvm/gems/ruby-2.1.0/gems/railties-4.0.3/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/usr/share/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
/usr/share/rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
tachyons commented 8 years ago

Seems like you missed this step

cp config/app_config.yml.example config/app_config.yml

smartniazi commented 8 years ago

I got it working now, Moments after i opened this issue.

=> Booting Thin
=> Rails 4.0.3 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/usr/share/rvm/gems/ruby-2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/http/mime_type.rb:166: warning: already initialized constant Mime::PDF
/usr/share/rvm/gems/ruby-2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/http/mime_type.rb:166: warning: previous definition of PDF was here
Thin web server (v1.7.0 codename Dunder Mifflin)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop

I've uploaded it under a subfolder on my domain, How to view the website now ?

tachyons commented 8 years ago

Go to localhost:3000

smartniazi commented 8 years ago

178.62.81.76:3000

It's not working

tachyons commented 8 years ago

Try rails s -b 178.62.81.76 -eproduction

But it is better to use passenger for deployment

smartniazi commented 8 years ago

Ran that command and this was the output

root@aim1one:/home/admin/web/aim1one.com/public_html/fluxday# rails s -b 178.62.81.76 -eproduction
=> Booting Thin
=> Rails 4.0.3 application starting in production on http://178.62.81.76:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
/usr/share/rvm/gems/ruby-2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/http/mime_type.rb:166: warning: already initialized constant Mime::PDF
/usr/share/rvm/gems/ruby-2.1.0/gems/actionpack-4.0.3/lib/action_dispatch/http/mime_type.rb:166: warning: previous definition of PDF was here
Thin web server (v1.7.0 codename Dunder Mifflin)
Maximum connections set to 1024
Listening on 178.62.81.76:3000, CTRL+C to stop

Still not working

stpnlr commented 8 years ago

@smartniazi you wont be able to access port 3000 from a digitalocean server(or any vps) externally without configuring the firewall to do so. either open port 3000 in the droplet's firewall or try running in port 80 (you can replace 3000 with 80 in @tachyons comment, but better make sure that it does not mess up with other servers like apache/nginx)

smartniazi commented 8 years ago

@stpnlr @tachyons both of you helped me alot to get this working.

I installed passenger as suggested and then opened the port 3000 and it started working, Now is there any way to use a domain instead of this IP:PORT

stpnlr commented 8 years ago

@smartniazi Follow this link. you can follow that choosing your OS installed in your droplet

And while performing the install, prefix all rake commands with _RAILSENV=production while executing