-
Notifications
You must be signed in to change notification settings - Fork 277
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
Unable to install rugged under Windows 7 #43
Comments
/cc @brianmario I'm not sure about how to fix this. The Is there anyway we can ship Rugged gems with a pre-build libgit2 dll under Windows? How does that even work? |
We could give cross-compiling a try - I do that for mysql2 and yajl-ruby. Although I don't ship mysql2 with the libmysql.dll itself, we could probably build and ship libgit2.dll pretty easily (assuming it builds under the compilers I use http://crossgcc.rts-software.org/doku.php) On Sunday, March 4, 2012 at 6:54 AM, Vicent Martí wrote:
|
Would be so great! |
If I build libgit2 dll on my windows machine using this instruction. What to do next? |
Is there any resolution to this issue? It is possible to create native builds on Windows with DevKit. The RDiscount project has figured out how to make it work for both Windows and Linux/UNIX. The build can be executed with a single command with DevKit (I've tested it):
Could a rugged developer please look at the RDiscount Rakefile and extconf.rb files to see if this cross-platform support can be added to rugged's build files? I volunteer to help with testing the builds on Windows. BTW, I've already compiled libgit2 on Windows so I should have all the necessary files. |
Can anyone offer any insight into this issue? I'd be happy to help get the Windows build working but I'll need some direction. |
I think you mean, it won't work under windows... YET. 👊 |
You could certainly write a Makefile.embed.w32, but the original one simply won't work. |
since the commonly-used windows ruby devkit ships with mingw32, using one embedded makefile in libgit2 seems tractable. I sent out a PR here: libgit2/libgit2#776 of course i can create two makefiles if you think that would be better... i would just be nervous about keeping all 3 makefiles in sync. |
until we release a new version of the gem, you can point your trusty Gemfiles to the updated code with: |
Thanks Scott! I downloaded the development version of libgit2 and compiled it with cmake using MinGW. I tried running that command above and it didn't work:
I added "gem install" like so:
Unfortunately that didn't work either. Error below.
Am I doing something wrong? I'm running Windows XP SP3. |
Create source :rubygems
gem "rugged", :git => "git://github.com/libgit2/rugged.git", :branch => "development" Then run (from folder with
NOTE: it will not install gem globally. Read about bundler |
right. alternatively you can clone the rugged git repository and just |
Thanks for that explanation. That got me going but it didn't work on my Windows development machine until I performed some tweaks to extconf.rb. I forked the repo and added the change. Here's the commit log: https://github.com/bmatzelle/rugged/commit/b6854a59c7e0dc4275a1ab02281fae19790d8de1 It should be cross-platform, except I'm concerned about that '/lib' directory part. Any thoughts on whether I should make a pull request on it? BTW, I created the gem with the following Gemfile: source :rubygems
gem "rugged", :git => "git://github.com/bmatzelle/rugged.git", :branch => "development" Then I ran the following command on that Gemfile:
|
@bmatzelle you shouldn't have to specify a LIBGIT2_PATH, rugged comes bundled with a libgit2 version that's known to work and will build it automatically. also while building the gem, devkit will automatically get added to your path, which should solve your likewise, rugged uses the Makefile.embed in libgit2, not cmake, so i'm not sure all of these fixes are needed? |
That wasn't working for me. It failed in extconf.rb because it evaluated ENV['LIBGIT2_PATH'] and saw that it was nil and tried to extract the locally stored .gz build of libgit2.
It assume that it didn't detect DevKit because that
I used cmake for compiling libgit2 only. However bundler was running extconf.rb, which was attempting to create a makefile and failed (until I created my patch). Bundler didn't use the Makefile.embed. Maybe that's my issue? I wrote the code because I didn't want to bother you guys with another "sorry guys, here's the next error message" so I decided to be proactive and get it working. I know the drill, however. My code might probably only work for for me and not be particularly useful to anyone else. I just wanted to show you guys I am legitimately trying to help. As it stands right now I have what's might be the first working win32 rugged gem on my computer, which is pretty nice. That helps me but not the entire rugged community. So is there anything else I can do/say that will help? |
@bmatzelle why did it fail to extract the locally stored tar ball? was there an error? |
FWIW, I had it installed straight from @scottjg url with no issue on MRI 1.9.3p194. |
so i have discovered that my local environment has mingw in %PATH%. DevKit does ship with |
@bmatzelle just to clear up: Bundler manage dependencies, it doesn't compile gems. For compilation used native mechanism of rubygems. Here is nice tutorial |
@scottjg why do you pack it as tar.gz and not using git submodule? Just curious.
|
ended up using a submodule |
Hey guys, I hate to go there again but that 'which make' issue is still there, even with the latest version:
|
@bmatzelle in the latest DevKit there is |
@stereobooster Thanks. That got me farther. Unfortunately the sub-module didn't work for some reason (I have the latest version of msysgit and TortoiseGit BTW). The directory is empty so I get this error:
|
execute |
@bmatzelle not sure why this isn't the default, but to use bundler with submodules, you gotta do... gem "rugged", :git => "git://github.com/libgit2/rugged.git", :branch => "development", :submodules => true adding to the rakefile might be more foolproof.. |
add task to rakefile #83 |
merged @stereobooster's change so hopefully this work ok for @bmatzelle now! |
That did it! Thank you @scottjg and @stereobooster! |
@bmatzelle did you run tests? |
@stereobooster I didn't run either of those commands. I just ran a local Ruby script on my machine and performed some simple operations, all of which worked so far. All of this work was in preparation for a Ruby project that uses Git but I won't be writing the actual code for at least a couple weeks. |
Did you know that not all git operations are implemented in rugged. Take a look TODO |
@stereobooster No, but it doesn't matter. The project is an early phase so I can use Git command-line wrappers at first to provide the basic functionality until Rugged gets up to speed. Thanks for that TODO link. I'll be monitoring it. |
take a look here https://github.com/mojombo/grit |
I already tried it but the posix-spawn gem dependency doesn't work with Windows: http://stackoverflow.com/questions/9554556/does-grit-works-with-windows-7-well |
Interesting. I'll try that out. Thanks! |
I have tried the last few hours to install rugged under windows 7 but failed. Here is the setup:
ruby.exe is in the path
DevKit is installed and found
When I run
gem install rugged
it fails with the following output:In the mentioned mkmf.log, I find the following lines at the end:
What Do I have to do / to install to fix that error for me?
The text was updated successfully, but these errors were encountered: