In answer to your question, though, you want __FILE__, not FILE. __FILE__ is a built-in constant that will always return the name of the current source file.
- Jamis On Apr 30, 2008, at 2:04 PM, Jordan Curzon wrote:
I'm trying to use the Git SCM module for capistrano from http://scie.nti.st/2007/9/4/capistrano-2-0-with-git-shared-repository and added "$: << File.dirname(FILE) + ’/../lib’" to the top of by config/deploy.rb file according to the comment by topfunky in order to put the git.rb extension in my rails' lib directory. When I put that command at the top of the file I get this bug: ./config/deploy.rb:1:in `load': uninitialized constant Capistrano::Configuration::FILE (NameError) from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:173:in ` load_from_file' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:89:in `l oad' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:86:in `l oad' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:86:in `e ach' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:86:in `l oad' from ./Capfile:2:in `load' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:173:in ` load_from_file' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/configuration/loading.rb:89:in `l oad' ... 7 levels... from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/ capistrano/cli/execute.rb:14:in `execute' from /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.1.0/bin/ cap:4 from /usr/local/bin/cap:19:in `load' from /usr/local/bin/cap:19 It seems that it is messing up the load path such that ruby can't find the File class, but how can I get capistrano to find git.rb: module Capistrano module Deploy module SCM module Git ...... while placing the git.rb file in my rails' lib directory and still have the File class accessible? Thanks --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
smime.p7s
Description: S/MIME cryptographic signature