undefined local variable or method `application' for main:Object

1,604 views
Skip to first unread message

Jürgen Coetsiers

unread,
Oct 13, 2013, 3:02:11 PM10/13/13
to capis...@googlegroups.com
I am trying to use the application name as a part of the vhostname.

Somehow I do not have access to it in the staging.rb

cap staging deploy:config_vhost
cap aborted!
undefined local variable or method `application' for main:Object
config/deploy.rb:25:in `block (2 levels) in <top (required)>'
/Users/jurgenc/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/lib/capistrano/application.rb:12:in `run'
/Users/jurgenc/.rvm/gems/ruby-2.0.0-p247/gems/capistrano-3.0.0/bin/cap:3:in `<top (required)>'
Tasks: TOP => deploy:config_vhost
(See full trace by running task with --trace)

</script>
 

Rafa García

unread,
Oct 14, 2013, 8:26:54 AM10/14/13
to capis...@googlegroups.com
Hi Jürgen,

  A little detail, next time don't include your pastie URL inside a script tag. You just write/share the link.

Thanks


2013/10/13 Jürgen Coetsiers <jur...@thecreativestores.com>

--
--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
---
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Lee Hambley

unread,
Oct 14, 2013, 8:28:07 AM10/14/13
to capistrano
Use `fetch(:application)`. Nowhere is documented bare use of the "variable" by it's name, in previous versions this was done with an incredibly nasty method_missing hack, and has been intentionally removed from the new version.

Jürgen Coetsiers

unread,
Oct 14, 2013, 11:35:12 AM10/14/13
to capis...@googlegroups.com
http://pastie.org/8399717.js

Op zondag 13 oktober 2013 21:02:11 UTC+2 schreef Jürgen Coetsiers:

Lee Hambley

unread,
Oct 14, 2013, 11:40:59 AM10/14/13
to capistrano

Sorry, there is no pastie #8399717 or it has been removed. Why not create a new pastie?

But I believe I answered your question Jürgen.

--
Reply all
Reply to author
Forward
0 new messages