Skip to content

Instantly share code, notes, and snippets.

@mdoroudi
Created April 7, 2015 21:08
Show Gist options
  • Save mdoroudi/d2bc3d41f7f0346fb9db to your computer and use it in GitHub Desktop.
Save mdoroudi/d2bc3d41f7f0346fb9db to your computer and use it in GitHub Desktop.
AppIntel - running rake task on the war file
[~/workspace/app_intel][warbler*]sudo java -jar app_intel.war -S rake -P
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
rake aborted!
SyntaxError: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier/resource.rb:14: syntax error, unexpected ':'
get "#{collection_url}/#{id}.json", headers: auth_headers
^/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier/resource.rb:11:in `(root)'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier.rb:76:in `require'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `require'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/gems/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/config/application.rb:73:in `(root)'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/config/application.rb:4:in `(root)'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby5648055035306800588extract/Rakefile:28:in `load_rakefile'
(See full trace by running task with --trace)
error: org.jruby.exceptions.RaiseException: (SystemExit) exit
@mdoroudi
Copy link
Author

mdoroudi commented Apr 7, 2015

This is the war file if you want to try it https://artifactory.flexilis.net/artifactory/simple/services-release-local/com/lookout/services/app_intel/1.0.37+f376b52/

rename the war to app_intel.war and run the rake task as follow:

java -jar app_intel.war -S rake -P

@mdoroudi
Copy link
Author

mdoroudi commented Apr 7, 2015

Full stack trace:

dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
rake aborted!
SyntaxError: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier/resource.rb:14: syntax error, unexpected ':'

    get "#{collection_url}/#{id}.json", headers: auth_headers
                                               ^org/jruby/RubyKernel.java:1033:in `require'

/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier/resource.rb:11:in (root)' org/jruby/RubyKernel.java:1033:inrequire'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/cdc_carrier-2.14.155/lib/cdc_carrier.rb:76:in require' org/jruby/RubyArray.java:1615:ineach'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in require' org/jruby/RubyArray.java:1615:ineach'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in require' /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/bundler-1.5.1/lib/bundler.rb:131:inrequire'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/config/application.rb:73:in (root)' org/jruby/RubyKernel.java:1033:inrequire'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/config/application.rb:4:in (root)' org/jruby/RubyKernel.java:1058:inload'
/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/Rakefile:28:in load_rakefile' /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:687:inraw_load_rakefile'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:94:in load_rakefile' /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:176:instandard_exception_handling'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:93:in load_rakefile' /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:77:inrun'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/lib/rake/application.rb:75:inrun'
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby2842977748417062279extract/gems/gems/rake-10.3.2/bin/rake:36:in `(root)'
error: org.jruby.exceptions.RaiseException: (SystemExit) exit

@mdoroudi
Copy link
Author

mdoroudi commented Apr 7, 2015

We also had a new hash syntax in the Gemfile that I removed, but puting that back and building the war file, and running the rake task we get:

[~/workspace/app_intel][warbler*]sudo java -jar app_intel.war -S rake -P --trace
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Bundler::GemfileError: Gemfile syntax error:

gem 'ledermann-rails-settings', '~> 1.2.1', require: 'rails-settings' # version 2.x removed global settings
^
eval_gemfile at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby6969369077951127822extract/gems/gems/bundler-1.5.1/lib/bundler/dsl.rb:33
evaluate at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby6969369077951127822extract/gems/gems/bundler-1.5.1/lib/bundler/dsl.rb:9
build at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby6969369077951127822extract/gems/gems/bundler-1.5.1/lib/bundler/definition.rb:26
definition at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby6969369077951127822extract/gems/gems/bundler-1.5.1/lib/bundler.rb:152
setup at /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/jruby6969369077951127822extract/gems/gems/bundler-1.5.1/lib/bundler.rb:115
(root) at <script>:8
error: org.jruby.embed.EvalFailedException: (GemfileError) Gemfile syntax error:

gem 'ledermann-rails-settings', '~> 1.2.1', require: 'rails-settings' # version 2.x removed global settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment