This project is archived and is in readonly mode.

#5090 ✓stale

allow to customize the Gemfile name via an environment variable

Reported by kristian | July 12th, 2010 @ 07:51 AM

I am working on a plugin for maven (a java build and project management tool) to offer ruby, gem, rspec and rails support. the main difficulty with rails3 is that bundler and the maven plugin overlap quite a bit on functional level. so I was looking for ways let bundler and maven coexists without favoring one or the other.

the current approach is to patch the config/boot.rb in a way that is does allow to use Gemfile.maven as "Gemfile" (the patched file looks like this so basically it obeys the environment variable BUNDLE_GEMFILE and uses it if set prior to setting the rails default.

with this patch one can take a newly created rails application and apply an maven archetype (like rails generators) to mavenize the application in a way that you can still use the rails application in the usual way as well use maven to run the webrick/mongrel server, to call generators or rake tasks or bundle the whole application into a war file for deployment.

so my aim is really to keep the rails application as it is and add a few files to use the very same with maven. but right now I need to patch the config/boot.rb to achieve this which is against the actual spirit.

so the attached patch does the same patch as maven does and I added an unit test which test most functionality. the patch is trivial but would let tools like maven to behave non invasive and maybe there are other usecases for more then one Gemfile (MRI versus JRuby when you need to lock down you dependencies, etc)

Comments and changes to this ticket

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:36 PM

    • State changed from “new” to “open”
    • Tag changed from maven jruby, boot.rb, bundler to maven jruby, bootrb, bundler

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:36 PM

    • State changed from “open” to “stale”
  • kristian

    kristian February 2nd, 2011 @ 05:19 PM

    from my side this became obsolete over time - please close that ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket