We have problems use go-agent run rake task for RoR project. Can anyone help us? Please contact me if you need more information.
We installed go-server and go-agent on the same machine.
OS:
ubuntu (11.04)
Go Version:
2.4
Rails 3
We can run rake task mannualy form the go-agent pipeline/project folder "/var/lib/go-agent/pipelines/<project>
But when trigger this task from go dashboard, got the following errors:
Comment
Hi,
Can you please post the output of
$ which rake
Regards,
Janmejay
$ which rake
/usr/local/ruby/bin/rake
Doesn't look like it is available in PATH for job.
The path you have set is: '/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
Where as rake is available in /usr/local/ruby/bin
May be you want to try appending this to your current PATH value.
Also, it seems you have tried to override the environment variable(i see it set to '/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/bin/ruby') in Go configuration. While I understand it may actually be what you want to do, as in, you want your rake task to see this PATH, please note that it doesn't have any effect on executable lookup done by Go agent. It will have effect on exec/fork-exec executable lookup done by rake task(agent's inferior process).
In this case, you want to set environment variables for Go agent by modifying /etc/default/go-agent(on linux) or equivallent for your platform. You will need to restart the agent for this to have effect.
If it still doesn't work, please post the console log of job run with new environment variable settings.
Regards,
Janmejay
Hi, I modified /etc/default/go-agent and got the following error:
[cruise] Current job status: passed.
Hi,
'bundle install' is actually not a command. 'bundle' is a command, which takes arguments, 'install' is one of those arguments.
'bundle install' would be a command when you have a script named 'bundle install' in the path. So it is again failing for executable lookup.
Can you please configure it to execute 'bundle' as a command, having one argument with value 'install'? you can do this by using args="install" attribute on <exec/> tag.
Regards,
Janmejay