Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `parse' for Time:Class #13

Closed
lunks opened this issue Jul 9, 2010 · 3 comments
Closed

undefined method `parse' for Time:Class #13

lunks opened this issue Jul 9, 2010 · 3 comments

Comments

@lunks
Copy link

lunks commented Jul 9, 2010

When running capybara using rack-test, I'm getting this error:

undefined method parse' for Time:Class # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:58:inexpires'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:63:in expired?' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:82:inmatches?'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:167:in block in hash_for' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:166:ineach'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:166:in hash_for' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test/cookie_jar.rb:143:infor'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/mock_session.rb:28:in request' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test.rb:207:inprocess_request'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test.rb:57:in get' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/rack-test-0.5.4/lib/rack/test.rb:154:infollow_redirect!'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/driver/rack_test_driver.rb:249:in block in follow_redirects!' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/driver/rack_test_driver.rb:248:intimes'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/driver/rack_test_driver.rb:248:in follow_redirects!' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/driver/rack_test_driver.rb:204:inprocess'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/driver/rack_test_driver.rb:85:in click' # /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/session.rb:46:inclick'
# /home/lunks/.rvm/gems/ruby-1.9.2-preview3@r3/gems/capybara-0.3.9/lib/capybara/dsl.rb:55:in click' # ./spec/integration/sign_in_guest_spec.rb:28:inblock (3 levels) in <top (required)>'

I realize it should be solved by requiring 'time' as it's being done now on cookie_jar.rb, but the error is still ocurring. Using Ruby 1.9.2 with Rails 3 and RSpec 2.

@marano
Copy link

marano commented Jul 9, 2010

I am also having this same issue, using the same environment described above :P

@marano
Copy link

marano commented Jul 12, 2010

Ok, this is not a bug. The thing is my application have a time.rb file which add some methods to Time class, so when the require 'time' is called the required time is not the core lib, the local additions is the loaded one.

@brynary
Copy link
Collaborator

brynary commented Sep 26, 2010

Closing.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants