srushti / goldberg

Goldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
Other
243 stars 29 forks source link

RVM fails to work properly if the .rvmrc is checked in #136

Closed skizz closed 11 years ago

skizz commented 12 years ago

According to RVM's documentation it is a best practice to check in your .rvmrc file.

(See number 2: https://rvm.io/rvm/best-practices/)

If you do this, then Goldberg tries to use its own rvm settings (goldberg-projectname) which is incorrect. Bundler is not installed and the build fails with the error "Bundler gem is not installed"

If the project is new, you need to login to the server and cd into the build directory and do a manual rvm gemset create/gem install bundler to fix this.

srushti commented 12 years ago

True. This is related to #89 because, ideally, Goldberg should be installing Bundler in the new gemset it's creating (which seems to be broken now).

Even if Goldberg honoured the checked in .rvmrc (which would mean you don't have to duplicate the ruby version in the goldberg_config.rb file) the lack of a Bundler install still means it's broken. We'll look into it now.

srushti commented 11 years ago

@skizz Like I said earlier, Goldberg is currently designed not to look at the project's own .rvmrc at all (irrespective of best practices). Instead it looks at goldberg_config to figure out what ruby you want to use. Having used that ruby (or the default ruby if nothing is specified) and the gemset "goldberg-projectname" it is meant to install bundler (if it doesn't already exist) and then start the build.

It looks like the installation of bundler here was broken. Could you verify that with the latest the bundler gem itself is being installed? If that's the case, please use the goldberg_config.rb file to set the ruby you wish to use. Then, I'll create another issue for goldberg to look for a .rvmrc first, and if it doesn't find it, to use the ruby from goldberg_config, and close this issue.

srushti commented 11 years ago

I'm not able to reproduce the issue with the Bundler gem (it did exist before, but looks like it's been fixed now). I've created #140 to cover the scenario of .rvmrc being ignored. As of now, you have to specify your Ruby in two places, but you shouldn't have to do your logging in to the server work.

As always, please let me know if this issue is still reproducible for you.