Dubious - Permission denied error

18 views
Skip to first unread message

Andrew

unread,
Jan 13, 2011, 1:22:30 AM1/13/11
to The Mirah Programming Language
Thought I'd try the new gem, but immediately hit an issue.



My initial thought was that it was because WEB-INF/classes didn't
exist. I created this and got the same problem.



Any ideas?



P.S. Experience same issue on Linux (Fedora)

=====



C:\Users\andrew\projects\dubious-projects>jruby -v

jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java
HotSpot(TM) C

lient VM 1.6.0_20) [x86-java]



C:\Users\andrew\projects\dubious-projects>mirah -v

Mirah v0.0.5



C:\Users\andrew\projects\dubious-projects>jruby -S gem list dubious



*** LOCAL GEMS ***



dubious (0.0.2)



C:\Users\andrew\projects\dubious-projects>dubious new testapp

create testapp

create testapp/Rakefile

create testapp/app/controllers/application_controller.mirah

create testapp/config/application.properties

create testapp/config/asset.properties

create testapp/config/build.properties

create testapp/config/routes.properties

create testapp/public/404.html

create testapp/public/422.html

create testapp/public/500.html

create testapp/public/favicon.ico

create testapp/public/index.html

create testapp/public/robots.txt

create testapp/public/images/appengine_duby.png

create testapp/public/images/back.gif

create testapp/public/images/dir.gif

create testapp/public/images/dubious.png

create testapp/public/images/file.gif

create testapp/public/images/silver-120x30.gif

create testapp/public/javascripts/jquery.rails.min.js

create testapp/public/stylesheets/main.css

create testapp/public/stylesheets/scaffold.css

create testapp/WEB-INF/app.yaml

create testapp/WEB-INF/lib/dubious.jar

create testapp/WEB-INF/lib/dubydatastore.jar



C:\Users\andrew\projects\dubious-projects>cd testapp



C:\Users\andrew\projects\dubious-projects\testapp>jruby -S rake server

(in C:/Users/andrew/projects/dubious-projects/testapp)

cd C:/Users/andrew/projects/dubious-projects/testapp/app

mirahc -d C:/Users/andrew/projects/dubious-projects/testapp/WEB-INF/
classes --cl

asspath C:/Users/andrew/projects/dubious-projects/testapp/WEB-INF/
classes:C:/Use

rs/andrew/projects/dubious-projects/testapp/WEB-INF/lib/dubious.jar:C:/
Users/and

rew/projects/dubious-projects/testapp/WEB-INF/lib/dubydatastore.jar:C:/
jruby/jru

by-1.5.6/lib/ruby/gems/1.8/gems/appengine-sdk-1.4.0/appengine-java-
sdk-1.4.0/lib

/shared/servlet-api.jar:C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/
appengine-sd

k-1.4.0/appengine-java-sdk-1.4.0/lib/impl/appengine-api.jar app/
controllers/appl

ication_controller.mirah

rake aborted!

Permission denied - app/controllers/application_controller.mirah



(See full trace by running task with --trace)



C:\Users\andrew\projects\dubious-projects\testapp>



C:\Users\andrew\projects\dubious-projects\testapp>jruby -S rake --
trace server

(in C:/Users/andrew/projects/dubious-projects/testapp)

** Invoke server (first_time)

** Invoke app (first_time)

** Invoke WEB-INF/classes/controllers/ApplicationController.class
(first_time)

** Invoke app/controllers/application_controller.mirah (first_time,
not_needed)

** Execute WEB-INF/classes/controllers/ApplicationController.class

cd C:/Users/andrew/projects/dubious-projects/testapp/app

mirahc -d C:/Users/andrew/projects/dubious-projects/testapp/WEB-INF/
classes --classpath C:/Users/andrew/projects/dubious-projects/testapp/
WEB-INF/classes:C:/Users/andrew/projects/dubious-projects/testapp/WEB-
INF/lib/dubious.jar:C:/Users/andrew/projects/dubious-projects/testapp/
WEB-INF/lib/dubydatastore.jar:C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/
gems/appengine-sdk-1.4.0/appengine-java-sdk-1.4.0/lib/shared/servlet-
api.jar:C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/appengine-
sdk-1.4.0/appengine-java-sdk-1.4.0/lib/impl/appengine-api.jar

app/controllers/application_controller.mirah

rake aborted!

Permission denied - app/controllers/application_controller.mirah

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:225:in `initialize'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:225:in `parse'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:201:in `generate'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:194:in `each'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:194:in `generate'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:181:in `compile'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah.rb:41:in `compile'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah_task.rb:106:in `mirahc'

C:/jruby/jruby-1.5.6/lib/ruby/1.8/fileutils.rb:121:in `chdir'

C:/jruby/jruby-1.5.6/lib/ruby/1.8/fileutils.rb:121:in `cd'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
1098:in `chdir'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah_task.rb:104:in `mirahc'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/mirah-0.0.5-java/lib/
mirah_task.rb:119

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
634:in `call'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
634:in `execute'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
631:in `each'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
631:in `execute'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
597:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
590:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
607:in `invoke_prerequisites'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
604:in `each'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
604:in `invoke_prerequisites'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
596:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
590:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
607:in `invoke_prerequisites'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
604:in `each'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
604:in `invoke_prerequisites'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
596:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
590:in `invoke_with_call_chain'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
583:in `invoke'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2051:in `invoke_task'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2029:in `top_level'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2029:in `each'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2029:in `top_level'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2068:in `standard_exception_handling'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2023:in `top_level'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2001:in `run'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
2068:in `standard_exception_handling'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:
1998:in `run'

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31

C:/jruby/jruby-1.5.6/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in
`load'

C:/jruby/jruby-1.5.6/bin/rake:19



C:\Users\andrew\projects\dubious-projects\testapp>

Daniel Sheppard

unread,
Jan 13, 2011, 1:27:24 AM1/13/11
to mi...@googlegroups.com

You need to fix mirah_task - it's not consistent when expanding paths.

--- a/lib/mirah_task.rb

+++ b/lib/mirah_task.rb

@@ -98,7 +98,7 @@ def mirahc(*files)

   end

   source_dir = options.fetch(:dir, Mirah.source_path)

   dest = File.expand_path(options.fetch(:dest, Mirah.dest_path))

-  files = files.map {|f| f.sub(/^#{source_dir}\//, '')}

+  files = files.map {|f| File.expand_path(f).sub(/^#{source_dir}\//, '')}

   flags = options.fetch(:options, Mirah.compiler_options)

   args = ['-d', dest, *flags] + files

   chdir(source_dir) do

Andrew Myers

unread,
Jan 13, 2011, 4:07:23 AM1/13/11
to mi...@googlegroups.com
Awesome - it works.  Thank you Daniel!

Andrew.
Reply all
Reply to author
Forward
0 new messages