您可以在弹性 beanstalk 环境中运行 rails 控制台或 rake 命令吗? [英] Can you run a rails console or rake command in the elastic beanstalk environment?

查看:20
本文介绍了您可以在弹性 beanstalk 环境中运行 rails 控制台或 rake 命令吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 AWS 的弹性 beantalk 上设置了一个 RoR 环境.我可以通过 ssh 连接到我的 EC2 实例.我的主目录是/home/ec2-user,实际上是空的.如果我向上移动一个目录,还有一个我无权访问的 /home/webapp 目录.

I have set up a RoR environement on AWS' elastic beanstalk. I am able to ssh into my EC2 instance. My home directory is /home/ec2-user, which is effectively empty. If I move up a directory, there is also a /home/webapp directory that i do not have access to.

有没有办法在我的弹性 beanstalk 实例上运行 rake 命令或 rails 控制台?

Is there a way to run a rake command or rails console on my elastic beanstalk instance?

如果我输入 rails console 我得到 Usage: rails new APP_PATH [options]如果我输入 RAILS_ENV=production bundle exec rails console,我得到Could not locate Gemfile"

If I type rails console I get Usage: rails new APP_PATH [options] If I type RAILS_ENV=production bundle exec rails console, I get "Could not locate Gemfile"

推荐答案

对于 rails,跳转到 /var/app/current 然后如@juanpastas 所说,运行 RAILS_ENV=production bundle execrails c

For rails, jump to /var/app/current then as @juanpastas said, run RAILS_ENV=production bundle exec rails c

这篇关于您可以在弹性 beanstalk 环境中运行 rails 控制台或 rake 命令吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆