8000 LoadError: no such file to load -- timecop on 0.5.8 and 0.5.9 · Issue #64 · travisjeffery/timecop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

LoadError: no such file to load -- timecop on 0.5.8 and 0.5.9 #64

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

Closed
aalvarado opened this issue Jan 9, 2013 · 9 comments
Closed

LoadError: no such file to load -- timecop on 0.5.8 and 0.5.9 #64

aalvarado opened this issue Jan 9, 2013 · 9 comments

Comments

@aalvarado
Copy link

Hello I'm getting no such file to load on timecop 0.5.8 and 0.5.9m it works fine on 0.5.7.

Im on OSX mountain lion with ruby 1.8.7

$ gem list | ack timecop
timecop (0.5.9, 0.5.8, 0.5.7, 0.3.5)
☺ aalvarado 15:16:09 ~
$ pry
[1] pry(main)> gem 'timecop', '=0.5.7'
=> true
[2] pry(main)> require 'timecop'
=> true
[3] pry(main)> Timecop.class
=> Class
[4] pry(main)> exit
☺ aalvarado 15:16:41 ~
$ pry
[1] pry(main)> gem 'timecop', '=0.5.8'
=> true
[2] pry(main)> require 'timecop'
LoadError: no such file to load -- timecop
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require'
[3] pry(main)> exit
☺ aalvarado 15:17:51 ~
$ pry
[1] pry(main)> gem 'timecop', '=0.5.9'
=> true
[2] pry(main)> require 'timecop'
LoadError: no such file to load -- timecop
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require'
[3] pry(main)> 
@travisjeffery
Copy link
Owner

Can't reproduce this, and I'm sure I would have had many related issues/comments if this was a common issue so I think it's a problem with your own system. Try uninstalling each version, and the reinstalling the latest version only.

@thisisfranciswu
Copy link

Getting the same error here, ended up downgrading timecop to 0.5.6. That did the trick.

@fredwu
Copy link
fredwu commented Jan 21, 2013

@aalvarado

We have encountered the exact same issue on our build server. After a few hours of debugging and head scratching, we have found the cause!

The problem with v0.5.8 and v0.5.9 are permission related.

For v0.5.7:

-rw-r--r-- 1 root rvm 5103 Jan 20 23:10 timecop.rb
-rw-r--r-- 1 root rvm 1920 Jan 20 23:10 time_extensions.rb
-rw-r--r-- 1 root rvm 4458 Jan 20 23:10 time_stack_item.rb
-rw-r--r-- 1 root rvm   38 Jan 20 23:10 version.rb

For v0.5.8 and v0.5.9:

-rw----r-- 1 root rvm 5103 Jan 20 23:12 timecop.rb
-rw----r-- 1 root rvm 1920 Jan 20 23:12 time_extensions.rb
-rw----r-- 1 root rvm 4342 Jan 20 23:12 time_stack_item.rb
-rw----r-- 1 root rvm   38 Jan 20 23:12 version.rb

You'll notice that the group-level users don't have permission to read any of those files thus resulting to load errors (since we use a different user for running the builds).

We've checked your git repo and all the permission are fine. So we suspect that you might have changed either your development environment or your gem publishing method therefore the gem packages pushed to rubygems have incorrect permissions.

@fredwu
Copy link
fredwu commented Jan 21, 2013

cc @travisjeffery Could you please double check your dev environment and release a new gem? :)

@travisjeffery
Copy link
Owner

This is the 2nd time this has happened, not sure what the cause is yet. Just pushed v0.5.9.1 which should have the correct read permissions.

travisjeffery pushed a commit that referenced this issue Jan 21, 2013
@fredwu
Copy link
fredwu commented Jan 21, 2013

👍

@oree
Copy link
oree commented Mar 22, 2013

I see the same issue with timecop v0.6.1 (on Mac OS X 10.7.5 and on 10.6)

lib/timecop/ has these permissions after gem install:

-rw-r--r--  1 root  admin  1920 22 märts 11:16 time_extensions.rb
-rw----r--  1 root  admin  4512 22 märts 11:16 time_stack_item.rb
-rw----r--  1 root  admin  5101 22 märts 11:16 timecop.rb
-rw-r--r--  1 root  admin    38 22 märts 11:16 version.rb

@gnomet
Copy link
gnomet commented Mar 25, 2013

I had the exact same issue as oree, with Mac OS X 10.8.2 and Timecop v0.6.1.
Fixing the permissions helped. Thanks for posting this info here!

@WilliamDenniss
Copy link

Also seeing this issue with timecop (0.6.1) on OS X 10.8.4 (12E55), with ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]

cannot load such file -- /Users/will/.rvm/gems/ruby-1.9.3-p125/gems/timecop-0.6.1/lib/timecop/timecop
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/timecop-0.6.1/lib/timecop.rb:1:in `<top (required)>'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/will/projects/discourse/config/application.rb:10:in `<top (required)>'
/Users/will/projects/discourse/Rakefile:5:in `require'
/Users/will/projects/discourse/Rakefile:5:in `<top (required)>'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/ra
867E
ke_module.rb:25:in `load'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/will/.rvm/gems/ruby-1.9.3-p125/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'

ls -la in /lib/timecop:

-rw-r--r--  1 root  staff  1920  6 Aug 16:58 time_extensions.rb
-rw----r--  1 root  staff  4512  6 Aug 16:58 time_stack_item.rb
-rw----r--  1 root  staff  5101  6 Aug 16:58 timecop.rb
-rw-r--r--  1 root  staff    38  6 Aug 16:58 version.rb

Successfully worked around with sudo chmod 644 *

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

7 participants
0