$ rails server
bin/rails:6: warning: already initialized constant APP_PATH
/Users/songhowon/job/onboardiq_app/bin/rails:6: warning: previous definition of APP_PATH was here
Usage: rails COMMAND [ARGS]
我尝试了一切。我重新安装了rbenv
,ruby
等。根据以下帖子,许多人都有同样的问题,但这对我不起作用。
rails server bin/rails:6: warning: already initialized constant APP_PATH error
奇怪的是这个错误只发生在特定的应用程序中。在新创建的应用中,rails s
效果很好。我很感激这个问题的任何帮助。
答案 0 :(得分:0)
尝试加入bin/rails
:
#!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
# need to investigate this error
# but in production it will happen, so cannot just raise everytime
raise if defined?(Rails) and Rails.env.development?
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'