jruby-rake-plugin doesn't play nice with bundler
------------------------------------------------

                 Key: JRUBY-5285
                 URL: http://jira.codehaus.org/browse/JRUBY-5285
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.5.6
         Environment: Ubuntu 10.04 LTS
            Reporter: John-Mason P. Shackelford
            Assignee: Thomas E Enebo


Given the snippet from my pom.xml...
{code}
<execution>
   <id>bundle-install</id>
   <phase>process-resources</phase>
   <goals>
      <goal>jruby</goal>
   </goals>
   <configuration>
      <args>-S bundle install</args>
   </configuration>
</execution>
{code}
I see the following when I run $ mvn process-resources:
{code}
[INFO] [jruby-rake:jruby {execution: bundle-install}]
[WARNING] jruby: No such file, directory, or command -- bundle
{code}
And yet:
{code}
$ jruby -S bundle install
{code}
works as expected. When I run the following code from the plugin and from jruby 
on the command-line, I see the exact same result.
{code}
# test.rb
puts "GEM_HOME: " + ENV['GEM_HOME'].inspect + "\n\n"
puts "GEM_PATH: " + ENV['GEM_PATH'].inspect + "\n\n"
puts " RUBYOPT: " + ENV["RUBYOPT"].inspect  + "\n\n"
{code}
yields:
{code}
[INFO] [jruby-rake:jruby {execution: run arbitrary ruby}]
[INFO] GEM_HOME: "/home/shacjo/.rvm/gems/jruby-1.5.6"
[INFO] 
[INFO] GEM_PATH: 
"/home/shacjo/.rvm/gems/jruby-1.5.6:/home/shacjo/.rvm/gems/jruby-1....@global"
[INFO] 
[INFO]  RUBYOPT: nil
[INFO] 
[INFO] [jruby-rake:jruby {execution: bundle-install}]
[WARNING] jruby: No such file, directory, or command -- bundle
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Thu Dec 30 14:32:48 CST 2010
[INFO] Final Memory: 8M/105M
[INFO] ------------------------------------------------------------------------
sha...@iowacwl-3z9jjk1:~/work/releng/conan-service$ jruby test.rb 
GEM_HOME: "/home/shacjo/.rvm/gems/jruby-1.5.6"

GEM_PATH: 
"/home/shacjo/.rvm/gems/jruby-1.5.6:/home/shacjo/.rvm/gems/jruby-1....@global"

 RUBYOPT: nil
{code}
Any other ruby command installed in /home/shacjo/.rvm/gems/jruby-1.5.6/bin runs 
just fine using the jruby-rake-plugin--I tried a bunch--but not bundler.

The main reason this is an issue for me is that for a Rails 3 project which 
produces a WAR via warbler, I want to be able to do:
{code}
<execution>
  <id>tests</id>
  <phase>test</phase>
  <goals>
    <goal>rake</goal>
  </goals>
  <configuration>
   <args>spec</args>
  </configuration>
</execution>
{code}
but the result is:
{code}
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [jruby-rake:rake {execution: tests}]
[INFO] rake already installed
[INFO] (in /home/shacjo/work/releng/conan-service)
[WARNING] 
file:/home/shacjo/.m2/repository/org/jruby/jruby-complete/1.5.6/jruby-complete-1.5.6.jar!/META-INF/jruby.home/bin/jruby
 -S bundle exec rspec "./spec/controllers/help/services_controller_spec.rb" 
"./spec/models/certification_spec.rb" 
"./spec/models/deployment_permission_spec.rb" 
"./spec/models/permission_spec.rb" "./spec/models/attachment_spec.rb" 
"./spec/models/label_spec.rb" "./spec/models/artifact_spec.rb" 
"./spec/models/maven_artifact_spec.rb" "./spec/models/comment_spec.rb" 
"./spec/models/user_spec.rb" "./spec/models/help/service_spec.rb" 
"./spec/models/help/initialization_spec.rb"
[WARNING] jruby: No such file, directory, or command -- bundle
{code}
even though it runs just fine from rake or directly using jruby -S bundle exec 
I wish I could tell you more, but I am at a loss to explain this.

{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to