warning —already initialized constant APP_PATH

Asked 2 years ago, Updated 2 years ago, 76 views

The rails suddenly stopped working...

This is the log displayed.

>bin/rails:6:warning:already initialized constant APP_PATH
>/Users/Sean/Desktop/Renascence/bin/rails:6:warning:previous
>definition of APP_PATH where Usage: rails COMMAND [ARGS]
> 
>The most common rails commands are: generate Generate new code
>(short-cut alias: "g") console Start the Rails console (short-cut)
>alias: "c") server Start the Rails server (short-cut alias: "s")
>dbconsole Start a console for the database specified in
>config/database.yml
>(short-cut alias: "db") new Create a new Rails application. "rails new my_app" create a
>new application called MyApp in "./my_app"
> 
>In addition to these, there are: application Generate the Rails
>application code destroy Undo code generated with "generate"
>(short-cut alias:"d") plugin new Generates skeleton for developing
>a Rails plugin runner Runapiece of code in the application
> environment (short-cut alias: "r")
> 
>All commands can be run with -h(or --help) for more information.

ruby-on-rails ruby rails-activerecord

2022-09-30 16:47

1 Answers

There seem to be various reasons for the error.

http://tic40.hatenablog.com/entry/2015/02/14/024415
http://xengineer.hatenablog.com/entry/2014/10/30/bin/rails%3A6%3A_warning%3A_already_initialized_constant_APP_PATH

The following command appears to indicate the real cause of the error:
Why don't you start with this?

rake rails:update:bin


2022-09-30 16:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.