Running the rails console command will show the rails default help page

42 views Asked by At

I have a bit of a weird situation. I'm using rbenv on my production server. Now I wanted to access the console:

cd $HOME/rails/current RAILS_ENV=production bundle exec rails console

Now Instead of the console opening I'm seeing:

Usage:


rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]
...

Some information:

which ruby
/home/myuser/.rbenv/shims/ruby

ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [x86_64-linux]

rbenv local
2.6.10

uname -a
Linux myserver 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I also tried:

RAILS_ENV=production rbenv exec bundle exec rails c

Debugging:

rails -v
bundle exec rails -v
rbenv exec bundle exec rails -v
# they all yield the following:
Rails 4.2.11.3
0

There are 0 answers