small medium large xlarge

23 Nov 2012, 21:13
Andrew Burke (2 posts)

In section 3.3 the @rake deploy.war@ task properly expands the .war file on the server, but the @jruby -S warbler-exec twitalytics.war bin/rake db:migrate@ call doesn’t seem to be able to find its way into the new expanded directory (which has a name like ‘d20121123-1659-1wx39lm ‘).

Instead, it tries to find rake in the ‘deploy’ directory, and I get an error like: @Error opening script file: /home/vagrant/deploy/bin/rake (No such file or directory)@.

It’s entirely possible I missed a step somewhere, but I’m also wondering if some library has changed in the months since publication? I tried rolling warbler back to 1.3.2 but that didn’t seem to make a difference.

28 Nov 2012, 19:17
Joe Kutner (86 posts)

I haven’t had a chance to try this out with the latest libraries. But this seems odd, and I haven’t heard of anyone else running into it.

I don’t think the version of Warbler would affect it – so you can go back to 1.3.4. But it could be the version of warbler-exec. What version are you using?

03 Apr 2013, 02:17
Jooin Kim (17 posts)

I have a issue at the same part, when I excuted ‘ rake deploy:war ‘, I got this.

 twitalytics git:(warbler) ✗ rake deploy:war   Copying twitalytics.war: 51982211/51982211    sh: jgem: not found    bash: line 4: jruby: command not found    rm -f twitalytics.war    Creating twitalytics.war

and I found some post about this part in Errata for this book.

from Errata, #50880, #49628 shows how they resolved. but neither of them worked to me.

03 Apr 2013, 15:01
Joe Kutner (86 posts)

They are resolved int he rough copy of the book, but they have not made it to an updated release yet (so you won’t see it in the book).

The fix is to change the line in the deploy.rake that looks like this:

sudo jgem install warbler-exec

to this:

sudo /opt/jruby/bin/jgem install warbler-exec

12 Apr 2013, 01:28
Glenn Goodrich (10 posts)

I still have the same problem that the original poster has. The command looks for bin/rake in the vagrant home directory.

I made the change mentioned in your post, Joe, but it didn’t change anything.

BTW, the book is great….just need a nudge to get past this bit.

12 Apr 2013, 13:20
Glenn Goodrich (10 posts)

So, it seems that when warble expands the war file, it creates all the files in the bin dir with a non-executable umask value.

I tried to set umask 000 in deploy.rake before the warbler-exec call, but it didn’t change anything.

If I ssh into the box and manually chmod +x the rake script, it executes the file.

So, now trying to figure out how to force a umask on those files.

You must be logged in to comment