Rails从陌生的环境开始

时间:2017-06-24 21:11:34

标签: ruby-on-rails ruby rbenv puma

我有一个非常离奇的问题突然出现在我的铁轨上。

我明确将RAILS_ENV设置为development

$ echo $RAILS_ENV
development

但是当我运行我的应用程序时,会发生以下两种情况之一:

  • 他们要么在端口3003上进行开发,而不是3000,而且
  • 对于一对夫妇,他们在端口3003上运行生产,无论我做什么,我都无法将它们切换到开发。

这发生在pow,puma-dev和使用rails s。我尝试在RAILS_ENV.powenv.pumaenv.bashrc.bash_profile.config/fish/config.fish中明确设置.rbenv-vars (我使用rbenv)。

我也试过改变ruby版本,但没有用。

我在擦拭启动器脚本后卸载并重新安装Pow,然后,在我感到沮丧之后,切换到puma-dev ......但是,同样的事情发生在rails s中,即使我使用bundle exec rails s -e development

任何人都知道还有什么地方可以看?我无法使用生产中运行的应用程序开发〜

2 个答案:

答案 0 :(得分:1)

我认为您可以查看我的案例中包含的config/puma.rb

threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads threads_count, threads_count
port        ENV.fetch("PORT") { 3000 }
environment ENV.fetch("RAILS_ENV") { "development" }
plugin :tmp_restart

(其他行评论)

答案 1 :(得分:1)

所以,显然,答案很明显。我的主文件夹中有一个错误的i was facing a issue while trying to add a new Store Procedure from database . update model from data base is showing extra line changes in all Store Procedure and showing in "Include Changes " in Visual studio . I am using Visual Studio 2015 , trying to add newly created store Procedure in Entity . any help will be appreciable ,it making me in trouble a lot .[![enter image description here][1]][1] 。我从服务器上下载了它并忘了它。

我通过运行.rbenv-vars(在一大堆其他类似命令之后)找到它。