Extracting from jruby complete fails for 1.1.3?

I use Capistrano to install Jruby to a remote server from the
jruby-complete jar stored in my Warbler /lib directory.

The script, including the following command, works fine with
jruby-complete-1.1.2.jar but not with 1.1.3:

“java -jar jruby-complete-#{v}.jar --command extract
/home/#{user}/jruby-#{v}”, where v = “1.1.3” or “1.1.2”. I also tried
the literal version of this directly from the command line and had the
same problem.

I’ve tested jars pulled from codehaus.org and double-checked obvious
errors I usually make. Can anyone duplicate a problem with for 1.1.3?

This transmission contains information for the exclusive use of the
intended recipient and may be privileged, confidential and/or otherwise
protected from disclosure. Any unauthorized review or distribution is
strictly prohibited. Our company is required to retain electronic mail
messages, which may be produced at the request of regulators or in
connection with litigation. Electronic messages cannot be guaranteed to
be secure, timely or error-free. As such, we recommend that you do not
send confidential information to us via electronic mail. This
communication is for informational purposes only and is not an offer or
solicitation to buy or sell any investment product. Any information
regarding specific investment products is subject to change without
notice. If you received this transmission in error, please notify the
sender immediately by return e-mail and delete this message and any
attachments from your system.

Hi Thomas,

On Tue, Jul 29, 2008 at 4:07 PM, Calloway, Thomas
[email protected] wrote:

I use Capistrano to install Jruby to a remote server from the jruby-complete
jar stored in my Warbler /lib directory.

Aha! So there is somebody out there who uses Capistrano with JRuby.
I see questions about that on #jruby IRC channel, from time to time,
but never had an answer. :slight_smile: Could you describe your setup, if that’s
not a problem or top secret? :slight_smile: Maybe, we could put such info on our
wiki for the future refernce too?

The script, including the following command, works fine with
jruby-complete-1.1.2.jar but not with 1.1.3:

“java -jar jruby-complete-#{v}.jar --command extract
/home/#{user}/jruby-#{v}”, where v = “1.1.3” or “1.1.2”. I also tried the
literal version of this directly from the command line and had the same
problem.

So, what kind of problem do you see exactly?

I tried both JRuby 1.1.2 and 1.1.3, and in both cases it worked (with
small issue to be aware of).

Essentially, it works until the jruby-complete is extracted to
default directory (for me it’s ~/.jruby), and this can be done when
you not specifying the destination directory in the command line.

Once jruby-complete is extracted to ~/.jruby, any subsequent
invocation doesn’t do anything for me, not extracting anything, even
when I specify different directory. Weird behavior that I haven’t yet
fully investigated.

Thanks,
–Vladimir


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Tue, Jul 29, 2008 at 10:39 AM, Vladimir S. [email protected]
wrote:

Essentially, it works until the jruby-complete is extracted to
default directory (for me it’s ~/.jruby), and this can be done when
you not specifying the destination directory in the command line.

Once jruby-complete is extracted to ~/.jruby, any subsequent
invocation doesn’t do anything for me, not extracting anything, even
when I specify different directory. Weird behavior that I haven’t yet
fully investigated.

Yeah, it’s a known issue with the jruby/extract.rb and
jruby/commands.rb code. You can work around with:

jruby -Djruby.home=/path/to/extract/location -jar
jruby-complete-1.1.3.jar -S extract

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Aha! So there is somebody out there who uses Capistrano with JRuby.
I see questions about that on #jruby IRC channel, from time to time,
but never had an answer. :slight_smile: Could you describe your setup, if that’s
not a problem or top secret? :slight_smile: Maybe, we could put such info on our
wiki for the future refernce too?

I use a really simple capistrano setup for my needs. It works for me,
but its not at all elegant:

namespace :myapp do

task :migrate, :roles => :primary_task_server do
run “cd /path/to/deploy_dir && jruby -S rake db:migrate
RAILS_ENV=production”
end

task :reindex, :roles => :primary_task_server do
run “cd /path/to/deploy_dir && jruby -S rake solr:reindex
RAILS_ENV=production”
end

task :deploy do
transaction do
upload_war
deploy_war
cleanup
end
end

task :upload_war, :roles => :file do
upload(“myapp.war”, “/export/tmp/myapp.war”, :via => :scp)
end

task :restart, :roles => :app do
sudo “/etc/init.d/glassfishv2 restart”
end

task :deploy_war, :roles => :app do
sudo “/etc/init.d/glassfishv2 deploy /export/tmp/myapp.war”
end

task :cleanup, :roles => :file do
run “rm /export/tmp/myapp.war”
end
end

So basically, I first run “jruby -S warble war”, and then cap
myapp:deploy. No fancy rollback stuff yet though. I also added some
tasks to run migration and an indexer task. Also, this example uploads
to a shared nfs export that is shared amongst the appservers, and then
deploys from there on each appserver.

Very simple setup, but it works for now. Oh, and since the db/migrate
folder isnt included by default in warble config, keep in mind to add
it if you want to be able to run migrations. My example also defined a
role that runs the remote tasks, which in my case is one of the
appservers.

If you guys do any of this in a smarter way, i’d love to hear about it.

Also, I run this on a ubuntu 8.04 with the bundled glassfishv2, only I
had to add the init scripts (which are used in my example deploy)
myself. You can just use asadmin instead if you dont want to bother
with initscripts.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email