Haml templates and permission denied only with jruby

With ruby MRI I have no problems.
I user jruby 1.6.0 with linux.
In my rails application I’m using haml as template.
When I run some generators, for example rails g devise:views, I have a
“permission denied problem”:

create app/views/devise
create app/views/devise/confirmations/new.html.haml
create
app/views/devise/mailer/confirmation_instructions.html.haml
create
app/views/devise/mailer/reset_password_instructions.html.haml
create app/views/devise/mailer/unlock_instructions.html.haml
create app/views/devise/passwords/edit.html.haml
create app/views/devise/passwords/new.html.haml
create app/views/devise/registrations/edit.html.haml
create app/views/devise/registrations/new.html.haml
create app/views/devise/sessions/new.html.haml
create app/views/devise/shared/_links.haml
create app/views/devise/unlocks/new.html.haml
Errno::EACCES: Permission denied -
/tmp/devise-haml.20110330-2719-z5ysrg/.
initialize at org/jruby/RubyFile.java:434
open at org/jruby/RubyIO.java:1116
remove_entry_secure at
/home/mauro/jruby/lib/ruby/1.8/fileutils.rb:699
mktmpdir at
/home/mauro/jruby/lib/ruby/1.8/tmpdir.rb:131
create_and_copy_haml_views at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/devise-1.1.2/lib/generators/devise/views_generator.rb:46
copy_views at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/devise-1.1.2/lib/generators/devise/views_generator.rb:18
send at org/jruby/RubyKernel.java:2038
run at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/task.rb:21
invoke_task at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:118
invoke_all at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124
each at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73
collect at org/jruby/RubyEnumerable.java:701
invoke_all at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/invocation.rb:124
dispatch at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/group.rb:226
start at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/thor-0.14.6/lib/thor/base.rb:389
invoke at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/generators.rb:163
(root) at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/commands/generate.rb:10
require at org/jruby/RubyKernel.java:1037
require at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239
load_dependency at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225
new_constants_in at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596
new_constants_in at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:595
load_dependency at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225
require at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239
(root) at
/home/mauro/jruby-1.6.0/lib/ruby/gems/1.8/gems/railties-3.0.5/lib/rails/commands/generate.rb:17
require at org/jruby/RubyKernel.java:1037
(root) at script/rails:6

As I said I have this problem when I use jruby and not with ruby.

this looks like that bug http://jira.codehaus.org/browse/JRUBY-5644

if that is the case please comment on the above issue.

  • Kristian