Error when running on windows #54

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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Nov 10, 2012

Owner

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'))
Owner

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

This comment has been minimized.

Show comment
Hide comment
@Leonas

Leonas 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.

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Nov 11, 2012

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@Leonas

Leonas Nov 11, 2012

Awesome, running genghisapp -F fixed everything! Thanks!

Leonas commented Nov 11, 2012

Awesome, running genghisapp -F fixed everything! Thanks!

@Leonas Leonas closed this Nov 11, 2012

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Nov 12, 2012

Owner

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).

Owner

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

This comment has been minimized.

Show comment
Hide comment
@runxc1

runxc1 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

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 8, 2013

Owner

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?

Owner

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

This comment has been minimized.

Show comment
Hide comment
@runxc1

runxc1 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.

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 8, 2013

Owner

Oh, there's also this one:

ruby `gem which genghis`

:)

Owner

bobthecow commented Feb 8, 2013

Oh, there's also this one:

ruby `gem which genghis`

:)

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 8, 2013

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 8, 2013

Owner

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

Owner

bobthecow commented Feb 8, 2013

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

@runxc1

This comment has been minimized.

Show comment
Hide comment
@runxc1

runxc1 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

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 8, 2013

Owner

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
Owner

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