有一个奇怪的问题,需要帮助.
我正在尝试在生产服务器上启动rails控制台,它的行为类似于rails c命令不存在.
FWIW,我已经成为一名铁路开发人员已有4年,并且一直在很多其他服务器上这样做而没有问题.在这台服务器上,我可以毫无问题地删除,创建,迁移,播种数据库(使用RAILS_ENV =生产),并且应用程序可以正常运行而不会出现任何问题.
建立:
Ubuntu 14.04(racksapce第二代性能1服务器)
Nginx with Passenger(我通常使用Unicorn,但从未在我使用Passenger部署的任何应用程序上遇到过问题)
Ruby 2.1.5(使用rvm)
Rails 4.1.7
Postgres
Capistrano 3(使用rvm,迁移,资产预编译等扩展)
我尝试过的:
进入app目录:
cd /home/deployer/app_name/current
Run Code Online (Sandbox Code Playgroud)
哪个加载.rvmrc并显示我在正确的gemset中,运行bundle只是为了踢.
rails c production # (which usually works no problem)
bundle exec rails c production # (sometimes have to do this on older apps that do not have the newer capistrano 3 and rvm setup)
rails c production RAILS_ENV=production # (getting desperate here)
RAILS_ENV=production rails c production # (haha, surely this won't work, but out of options)
RAILS_ENV=production …Run Code Online (Sandbox Code Playgroud)