0

I got this error just after installing devise 3.4.0 gem in my application. When I input rails s in terminal, I get the error below..

[kmartin@localhost register]$ rails s
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
bin/rails:6: warning: already initialized constant APP_PATH
/home/kmartin/work/register/bin/rails:6: warning: previous definition of APP_PATH was here
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" creates a
             new application called MyApp in "./my_app"

In addition to those, there are:
 destroy      Undo code generated with "generate" (short-cut alias: "d")
 plugin new   Generates skeleton for developing a Rails plugin
 runner       Run a piece of code in the application environment (short-cut alias: "r")

All commands can be run with -h (or --help) for more information.
Arslan Ali
  • 17,418
  • 8
  • 58
  • 76
  • possible duplicate of [rails server bin/rails:6: warning: already initialized constant APP\_PATH error](http://stackoverflow.com/questions/23402820/rails-server-bin-rails6-warning-already-initialized-constant-app-path-error) – shivam Apr 20 '15 at 06:44
  • @shivam i have checked that link and seems all solutions there dont work for for my error cant figure out why – user4737150 Apr 20 '15 at 06:48
  • what does `rake rails:update:bin` returns? – shivam Apr 20 '15 at 06:51
  • @shivam it overwrites the previous bin/rails file and when i run rails s its give me error of uninitialised constant Mart..Mart is my devise user i created...[kmartin@localhost register]$ rake rails:update:bin exist bin identical bin/bundle conflict bin/rails Overwrite /home/kmartin/work/register/bin/rails? (enter "h" for help) [Ynaqdh] Y force bin/rails identical bin/rake identical bin/setup – user4737150 Apr 20 '15 at 06:56
  • Try running `rails c` - you should get a more explicit error – Frederick Cheung Apr 20 '15 at 07:11

1 Answers1

0

I actually just changed my devise gem from 3.1. to just gem 'devise' then bundle installed and my problem was solved...It seems the version of devise wasnt supported by rails 4.