5

The rails console command is not working on digitalocean. I have also tried RAILS_ENV=staging bundle exec rails console.

Is this a known issue? Experts please help me.

It just shows rails command for creating new rails application.

I am using a ubuntu 14.04 server in digitalocean.

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Md Sirajus Salayhin
  • 4,974
  • 5
  • 37
  • 46

2 Answers2

17

I have figured it out.

I just remove bin directory and run the command to regenerate bin again.

Running below commands solve my problem.

rm -r bin/*

bundle exec rake rails:update:bin
Md Sirajus Salayhin
  • 4,974
  • 5
  • 37
  • 46
1

I believe you are not giving the command rails console inside project directory. You should be giving the command in the project directory.

When rails console is given outside the project directory(see the below image)

enter image description here

And when the rails console is given inside the project directory(see the below image)

enter image description here

Pavan
  • 33,316
  • 7
  • 50
  • 76