deployment - Accessing Rails Console in production -


i using capistrano 3 deploy rails app, , have run problem when trying access rails console on vps. when run:

rails console production 

i error require relative can't load file config/boot.rb. problem seems stemming fact app using rails executable in shared/bin whereas of app logic in current/bin. problem shared/config directory not contain boot.rb file. if run:

bundle install --production 

then seems work. should remove capistrano/bundler cap file , have capistrano script run bundle install --production, or getting other benefits capistrano/bundler?

rails console script use files in folder bin. bin folder must in root folder of project (it in repositories), not in shared folder symlinks.

problem in default capistrano config deploy.rb:

set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

so capistrano delete existed folders before create symlinks.

info [b72e6ca9] running /usr/bin/env rm -rf /myproject/releases/20150409074324/bin

info [f1ba66e7] running /usr/bin/env ln -s /myproject/shared/bin /myproject/releases/20150409074324/bin

remove bin linked_dirs fix that.


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -