Recent Blog Entries

[FIX] With Rails 2.3.x, undefined local variable or method `dep' for Gem:Module

I received this message when I ran cucumber tests but not when I used script/console. Kinda strange. Perhaps this is because I didn't configure cucumber for my dev environment?? Anyway, the fix:

1
2
gem uninstall rubygems-update
gem update --system 1.4.3

In the words of Yoda, "Unfortunate this is, and unexpected."

References
=======
Can not install redmine
Gist -- Undefined local variable dep
RubyGems Developers Mailing List
StackOverflow -- How do you downgrade RubyGems

Rails says, "Missing pdf-writer" when pdf-writer is unpacked in vendor/gems

Issue:
*"Missing these required gems: pdf-writer = 1.1.8"*

config/environment.rb:
Issue:
*"Missing these required gems: pdf-writer = 1.1.8"*

config/environment.rb:
1
  config.gem "pdf-writer", :lib => "pdf/writer", :version => '1.1.8'

That looks write... what's the issue? Turns out my new server didn't have the required dependencies.

I added this above the config/gem line:

1
  require "#{RAILS_ROOT}/vendor/gems/pdf-writer-1.1.8/lib/pdf/writer.rb"

and saw:

1
2
  no such file to load -- color
  no such file to load -- transaction-simple      # after fixing color

the fixes:
1
2
  gem install color
  gem install transaction-simple

remove the require line, and voila!