ironsand
ironsand

Reputation: 15151

"db:local:sync" doesn't work after updating ruby 2.2.2 to 2.3.3

I updated ruby version of my rails project from 2.2.2 to 2.3.3, and the project itself works fine.

But when I tried to pull the database from remote by using capistrano-db-tasks, it ends up with a error env: ruby.exe: No such file or directory like this:

$ bundle exec cap production db:local:sync
Loading local database config
env: ruby.exe: No such file or directory

This is my environmentail info:

% cat .ruby-version
2.3.3
% ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]

Where should I set the ruby path for the task?

Upvotes: 0

Views: 26

Answers (1)

Blackcoat77
Blackcoat77

Reputation: 1625

Check your app/bin folder. If you open bundle file from bin folder, and the first line is #!/usr/bin/env ruby.exe, try replacing it with:

#!/usr/bin/env ruby

If that doesn't work check rails file from the same folder, and do the same like mentioned above.

Upvotes: 1

Related Questions