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

Error when running on windows #54

Closed
Leonas opened this issue Nov 10, 2012 · 13 comments
Closed

Error when running on windows #54

Leonas opened this issue Nov 10, 2012 · 13 comments

Comments

@Leonas
Copy link

@Leonas Leonas commented Nov 10, 2012

This gem install fine but when I run it, I get the following error:

$ genghisapp
c:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -

  • win32/process (LoadError)
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in require' from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/vegas-0.1.8/lib/vegas/runner.rb:8:intop (required)
    '
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/genghisapp-2.1.3/bin/genghisapp:11:in `top (required)
    '
    from c:/RailsInstaller/Ruby1.9.3/bin/genghisapp:19:in 'load'
    from c:/RailsInstaller/Ruby1.9.3/bin/genghisapp:19:in 'main'
@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 10, 2012

I have honestly never used Ruby on Windows :)

I'll try to help, but I'm traveling so I don't have a windows instance handy to test this on. Do you mind trying something for me? Edit c:/RailsInstaller/Ruby1.9.3/bin/genghisapp and change out the require File.expand_path line for this:

require File.expand_path(File.join(File.dirname(__FILE__), '..', 'genghis'))
@Leonas
Copy link
Author

@Leonas Leonas commented Nov 11, 2012

Looks like your app won't work on windows because of a dependency. I looked further into this and the vegas gem doesn't work with windows. In one of vegas' source files it said to do 'gem install win32-process' but then the daemon wasn't working and found that they have given up on making it work with windows:

quirkey/vegas#3

Maybe you can use a different gem for that job because genghis is awesome but I use windows as well. At least it works on my macbook.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 11, 2012

From that issue, it looks like it's just daemonization that is broken on windows. If you run it in the foreground (-F flag) does it work?

Regardless, if that's the issue you're running into, it should still work mounted in rack. Try the rack instructions?

https://github.com/bobthecow/genghis#in-an-existing-rack-app

@Leonas
Copy link
Author

@Leonas Leonas commented Nov 11, 2012

Awesome, running genghisapp -F fixed everything! Thanks!

@Leonas Leonas closed this Nov 11, 2012
bobthecow added a commit that referenced this issue Nov 12, 2012
@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Nov 12, 2012

Thanks for your help tracking this down. As of the next release, genghisapp will always run in the foreground for Windows users (and a note to that effect has been added to the README).

@runxc1
Copy link

@runxc1 runxc1 commented Feb 8, 2013

So just curious how does this tell that its running on Windows. I am trying to get this up and running on windows 8 and am running into these errors even with the -F flag

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Feb 8, 2013

It's here and here... I don't have a windows box with Ruby to test on, so I was relying on the built-in check in Vegas.

If it's not working for you, do you mind opening irb and checking what RUBY_PLATFORM is set to?

@runxc1
Copy link

@runxc1 runxc1 commented Feb 8, 2013

i386-mingw32 is what it is set to. As a side note I was able to set it up as a Rack app. I had never set up a Rack app so didn't know that it was that easy. For those that read this later just drop the config.ru in a directory and run the command "rackup config.ru" from the directory and you are good to go.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Feb 8, 2013

Oh, there's also this one:

ruby `gem which genghis`

:)

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Feb 8, 2013

if it's i386-mingw32, then the detection is working properly. it must be something with Vegas in Windows 8 then :-/

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Feb 8, 2013

wait. is that how you say "interpolate the output of this command" in windows? i don't remember.

@runxc1
Copy link

@runxc1 runxc1 commented Feb 8, 2013

C:/Ruby193/lib/ruby/gems/1.9.1/gems/genghisapp-2.1.6/./genghis.rb
is the output from
ruby gem which genghis

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Feb 8, 2013

On *nix shells the backticks make it interpolate the result of the "which" call, but I don't know how to do that on Windows. It's the same as running:

ruby C:/Ruby193/lib/ruby/gems/1.9.1/gems/genghisapp-2.1.6/./genghis.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.