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

Can't install gem #313

Closed
digitalheir opened this issue Sep 25, 2013 · 14 comments · Fixed by #318
Closed

Can't install gem #313

digitalheir opened this issue Sep 25, 2013 · 14 comments · Fixed by #318

Comments

@digitalheir
Copy link

Tring to install this gem on Rails 4.0 using Ruby 2.0, I get the folling error after both bundler install and gem install:

Errno::ENOENT: No such file or directory - C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/octokit-2.1.2/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/methods_requiring_a_pull_request_comment/_create_pull_request_comment_reply/creates_a_new_reply_to_a_pull_request_comment.json
An error occurred while installing octokit (2.1.2), and Bundler cannot continue.
Make sure that `gem install octokit -v '2.1.2'` succeeds before bundling.

I think the path name is too long for the Windows file system.

@Kenshin
Copy link

Kenshin commented Sep 26, 2013

I also encountered this problem, could you tell me is how to solve @digitalheir

@joeyw
Copy link
Contributor

joeyw commented Sep 26, 2013

Windows has 260 character path limit, in this case the path length is 268. A temporary solution is to make a new folder to install the gems into instead of the C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/ path such as c:\temp_gems by adding a GEM_HOME environmental variable. Once you add it and restart the command prompt Octokit should install.

@digitalheir
Copy link
Author

What I did was

> gem env

It showed two paths:

- GEM PATHS:
   - C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0
   - C:/Users/Maarten/.gem/ruby/2.0.0

I picked the latter, and set it through set GEM_HOME=C:/Users/Maarten/.gem/ruby/2.0.0

@nikolay
Copy link

nikolay commented Oct 1, 2013

Why is this issue closed? It's obvious that Octokit cannot be installed properly on Windows and needs dirty workarounds, which aren't documented. Can you make the directory nesting and naming a bit more sane? I don't use Windows much, but I don't recall any other major RubyGem to have such issue.

@catsby
Copy link
Contributor

catsby commented Oct 1, 2013

@pengwynn can we do without this in the gemspec?

spec.files += Dir.glob("spec/**/*")

Seems like that may resolve this very long path issues expressed here.

@digitalheir
Copy link
Author

I closed this issue because the issue was solved for me. Considering that we're in a bug tracker, and yes, this is a bug, I'll reopen it.

@digitalheir digitalheir reopened this Oct 1, 2013
@nikolay
Copy link

nikolay commented Oct 1, 2013

@digitalheir Thank you! I really want to take advantage of the beautiful new Releases API, but without the ugly workarounds and, unfortunately, my stuff needs to run under Windows as well.

pengwynn added a commit that referenced this issue Oct 1, 2013
Fixes #313. While shipping specs with the gem is preferable, running the
test suite requires some additonal setup anyway so developers will end
up needing the full source from GitHub.
@pengwynn
Copy link
Collaborator

pengwynn commented Oct 1, 2013

@catsby Good idea. Just opened #318.

@nikolay or @digitalheir, can one of you pull that branch and try to install the gem on Windows with rake install ?

@nikolay
Copy link

nikolay commented Oct 1, 2013

@pengwynn I will try in a few hours. Thanks!

@pengwynn
Copy link
Collaborator

pengwynn commented Oct 1, 2013

@nikolay Thanks. I just merged #318 into master because I'm prepping a release for an unrelated issue. If this is still an issue on that new release, please reopen.

@nikolay
Copy link

nikolay commented Oct 1, 2013

Great!

@nikolay
Copy link

nikolay commented Oct 2, 2013

@pengwynn Thanks! It works just fine on Windows now!

@pengwynn
Copy link
Collaborator

pengwynn commented Oct 2, 2013

🤘

@catsby
Copy link
Contributor

catsby commented Oct 2, 2013

high-five

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

Successfully merging a pull request may close this issue.

6 participants