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

Support for Ruby 1.9.x on Windows #54

Closed
andrewdsmith opened this issue Nov 23, 2010 · 9 comments
Closed

Support for Ruby 1.9.x on Windows #54

andrewdsmith opened this issue Nov 23, 2010 · 9 comments

Comments

@andrewdsmith
Copy link

The json gem produces a nasty "this application has failed to start because msvcrt-ruby18.dll was not found json" pop-up error on Windows when running under Ruby 1.9.x. It's fine under Ruby 1.8.x. Yes, json_pure solves this but many other gems such as cucumber depend on json and so pull it in automatically and lead to a lot of headaches. There's mention of a "fat-binary" approach for gems in this post that sounds promising: http://groups.google.com/group/cukes/browse_thread/thread/8a1e95abd3adbf68?pli=1

@jmthomas
Copy link

There are all kinds of posts about this issue when using Ruby on Windows and the result is always:

gem uninstall json
gem install json --platform=ruby

Please create a fat binary! The best place to get started appears to be here:
https://github.com/luislavena/rake-compiler

@drnic
Copy link

drnic commented Dec 22, 2010

+1

1 similar comment
@deizel
Copy link

deizel commented Dec 23, 2010

+1

@mitchellh
Copy link

Please create a fat binary as recommended by the first commenter.

+1

@jarib
Copy link

jarib commented Jan 11, 2011

+1

1 similar comment
@Tridon
Copy link

Tridon commented Jan 13, 2011

+1

@flori
Copy link
Owner

flori commented Jan 26, 2011

can you try version 1.5.1?

@jmthomas
Copy link

I did a straight gem install json and it installed json-1.5.1-x85-mingw32. When I require json in IRB I do NOT get the popup error so I think you may have solved it. I can't use in my rails app because of various other dependencies (gherkin 2.3.3) but hopefully they will test with 1.5.X soon and this can be finally be resolved for us poor Windows users.

@andreydjason
Copy link

+1

headius added a commit to headius/json that referenced this issue Aug 15, 2023
Json.dump allows you to pass an IO to which the dump output will
be sent, but it still buffers the entire output in memory before
sending it to the given IO. This leads to issues on JRuby like
jruby/jruby#6265 when it tries to create a byte[] that exceeds the
maximum size of a signed int (JVM's array size limit).

This commit plumbs the IO all the way through the generation logic
so that it can be written to directly without filling a temporary
memory buffer first. This allow JRuby to dump object graphs that
would normally produce more content than the JVM can hold in a
single array, providing a workaround for jruby/jruby#6265.

It is unfortunately a bit slow to dump directly to IO due to the
many small writes that all acquire locks and participate in the
IO encoding subsystem. A more direct path that can skip some of
these pieces could be more competitive with the in-memory version,
but functionally it expands the size of graphs that cana be dumped
when using JRuby.

See flori#54
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

9 participants