effkay / blazing

painless git push deployments for everyone
MIT License
80 stars 12 forks source link

bundle: command not found #90

Closed u007 closed 7 years ago

u007 commented 7 years ago

rails 4.2, using rvm, ruby 2.3.1

remote: ------
remote: ------  [blazing] ENTERING POST RECEIVE HOOK FOR: production
remote: ------
remote: ------> [blazing] Doing a hard reset and checking out refs/heads/main since thats what you pushed
remote: HEAD is now at d455b93 return all roles
remote: Previous HEAD position was d455b93... return all roles
remote: HEAD is now at 3de87bf... fixed product added parent to category
remote: ------> [blazing] Bundling gems!!
remote: hooks/post-receive: line 28: bundle: command not found
remote: hooks/post-receive: line 38: syntax error near unexpected token `fi'
remote: hooks/post-receive: line 38: `fi'
effkay commented 7 years ago

Hi @u007

It seems like you do not have bundler installed on your server. (see Usage -> Installation in Readme)

u007 commented 7 years ago

ive never changed any setting. it just stop working and im using rvm

effkay commented 7 years ago

Hi @u007

Not sure why it would stop working. Maybe an rvm update/new gemset? Just make sure that the rvm environment your are running in has bundler installed and you should be fine!

u007 commented 7 years ago

i made the fix! :) i went into server , vi .git/hooks/post-receive change all command bundle ... to

rvm use 2.3.1 do bundle ...

and it works! maybe u can put this in readme or something

effkay commented 7 years ago

Keep in mind that if you run blazing update your post-receive hook will be overwritten. The safe way to solve your problem would be to use the env_scripts options to source in rvm. Check out the sample configuration file for more details.

u007 commented 7 years ago

ive already added env_scripts /etc/profile.d/rvm.sh and even ran rvm use 2.3.1 didnt work