It's a jruby problem?

I’m using jruby-1.6.0.rc2 and rails 3.
I’ve installed gem web-app-them and run:

jruby -S rails g web_app_theme:theme --theme=“drastic-dark”
–engine=haml --app-name=“MyApp”

I’ve this error:

org/jruby/RubyFile.java:428:in initialize': Permission denied - /tmp/web-app-theme-haml20110301-12010-r707i1/. (Errno::EACCES) from org/jruby/RubyIO.java:1074:inopen’
from /home/user/jruby/lib/ruby/1.8/fileutils.rb:699:in
remove_entry_secure' from /home/user/jruby/lib/ruby/1.8/tmpdir.rb:131:inmktmpdir’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/theme/theme_generator.rb:49:in
generate_haml_layout' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/theme/theme_generator.rb:20:incopy_layout’
from org/jruby/RubyKernel.java:2039:in send' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:21:inrun’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118:in
invoke_task' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73:in
each' from org/jruby/RubyEnumerable.java:701:incollect’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
invoke_all' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/group.rb:226:indispatch’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/base.rb:389:in
start' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/generators.rb:163:ininvoke’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/commands/generate.rb:10:in
(root)' from org/jruby/RubyKernel.java:1038:inrequire’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in
require' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:inload_dependency’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in
new_constants_in' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:595:innew_constants_in’
from AbstractScript.java:41:in (root)' from /home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:inload_dependency’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in
require' from AbstractScript.java:41:in(root)’
from
/home/user/jruby-1.6.0.RC2/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/commands/generate.rb:17:in
(root)' from org/jruby/RubyKernel.java:1038:inrequire’
from script/rails:6:in `(root)’

It’s a jruby problem?

Layman’s view:

Easiest way to test if something is a jruby problem is to run the same
command using normal ruby.

However it seems that in this case you do not have read/write access to
/tmp?

Jeff

On 1 March 2011 10:58, Jeffrey J. [email protected] wrote:

Layman’s view:

Easiest way to test if something is a jruby problem is to run the same
command using normal ruby.

However it seems that in this case you do not have read/write access to
/tmp?

I’m the same user that launched the command so I have read/write access.

mauro@msan ls -l /tmp/

drwx------ 2 mauro mauro 1024 1 mar 11.23
web-app-theme-haml20110301-12117-1chd61d

I think the problem is haml.
If I run in pure ruby it works,
If I run
ruby -S rails g web_app_theme:theme --theme=“drastic-dark”
–engine=haml --app-name="MyApp

I have the permission denied error, while if I run

ruby -S rails g web_app_theme:theme --theme=“drastic-dark”
–app-name="MyApp

without --engine=haml it works.