Closed harunyasar closed 7 years ago
Are you running Genghis under RVM or rbenv? Are you running bundle exec genghis
, or do you have some sort of shell or rbenv extension which does the equivalent?
Under RVM. I'm running the app with "genghisapp" standalone.
When you restart, does it say 'genghisapp' is already running
… or trying port 5678...
?
I have kill the process with "genghisapp --kill" then I restarted but not saying like you say. The output is below... [2014-09-04 13:57:49 +0000] Starting 'genghisapp'... [2014-09-04 13:57:49 +0000] trying port 5678... Couldn't get a file descriptor referring to the console
Okay, so it's actually restarting and not just finding an old abandoned genghis instance that's already running.
What OS, OS version, and Ruby version are you running?
Run this in irb
and let me know what it says:
require 'rubygems'
Gem::Specification.select { |s| s.name == 'mongo' }
Gem::Specification.select { |s| s.name == 'bson_ext' }
Mac OS X Yosemite Beta 2 Version 2.3.11
2.1.2 :001 > require 'rubygems'
=> false
2.1.2 :002 > Gem::Specification.select { |s| s.name == 'mongo' }
=> [#<Gem::Specification:0x53587c mongo-1.9.2>]
2.1.2 :003 > Gem::Specification.select { |s| s.name == 'bson_ext' }
=> [#<Gem::Specification:0x437da8 bson_ext-1.10.2>, #<Gem::Specification:0x346480 bson_ext-1.9.2>]
2.1.2 :004 >
(I added backticks to your comment so I could read the output)
Ok :)
Uninstall bson_ext v1.10.2
and it should work. Mongo sometimes has a fit if the mongo driver version doesn't match the bson_ext version, and removing the other version would keep that from happening.
gem uninstall bson --version '> 1.10'
gem uninstall bson_ext --version '> 1.10'
yes you're right. it is ok now. thanks for your help.
Great. I'll add a better message when the issue is version mismatch. Let's keep this issue open until I get around to that.
gem uninstall bson --version '> 1.10'
gem uninstall bson_ext --version '> 1.10'
works
I just had this issue again (ノಠ益ಠ)ノ. As mentioned above, one must have version parity with mongo
and its dependencies. For those coming in from search, in short, your install may need to look something like:
> gem list | grep -w 'bson\|bson_ext\|mongo'
bson (1.9.2)
bson_ext (1.9.2)
mongo (1.9.2)
what got me in to trouble was this:
> gem list | grep -w 'bson\|bson_ext\|mongo'
bson (2.3.0, 1.10.2, 1.9.2)
bson_ext (1.10.2, 1.9.2)
mongo (1.10.2, 1.9.2)
...or I'm still derp, but the problem did go away along with the other versions. ʅʕ•ᴥ•ʔʃ
Ahh, yeah, having bson 2.3.0 is going to cause you issues. It's prolly installed on your system because of Mongoid/Moped? If you use Genghis with bundle exec and a Gemfile, it'll fix that.
Sorry to dredge up the old issue, but I just got bitten by this.
The new message when running genghis is nice, ts told me exactly which version to install. Unfortunately I had already installed bson_ext without specifying the version because the output from the commandline from genghis did not include the version number.
It would have been nice if the console output also mentioned the version I needed. ;)
Help me!
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\genghisapp-2.3.11>gem list |find "bson" bson (3.2.1, 1.9.2) bson_ext (1.9.2)
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\genghisapp-2.3.11>ruby -v ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32]
C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\genghisapp-2.3.11>genghisapp
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- win32/process (LoadError) from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_req uire.rb:55:in
require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/backports-3.6.6/lib/backport
s/std_lib.rb:9:in require_with_backports' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/vegas-0.1.11/lib/vegas/runne r.rb:8:in
<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/genghisapp-2.3.11/bin/genghi
sapp:12:in <top (required)>' from C:/Ruby22-x64/bin/genghisapp:23:in
load'
from C:/Ruby22-x64/bin/genghisapp:23:in `
@doughsay unfortunately that output is coming from the bson gem and there's not much we can do about it :(
maybe detect the issue ourselves and add a second message?
@guyskk you have the exact same issue. bson and bson_ext gems have to be the exact same versions, and you should only have one of them installed. uninstall all of 'em and start over :)
if you just install bson and start up genghis, the UI will show you the exact command to run to get the right version of bson_ext.
I uninstall all bson, bson_ext, genghisapp, then install genghisapp,
C:\Users\kk>gem install genghisapp Fetching: bson-1.9.2.gem (100%) Successfully installed bson-1.9.2 Successfully installed genghisapp-2.3.11 Parsing documentation for bson-1.9.2 Installing ri documentation for bson-1.9.2 Parsing documentation for genghisapp-2.3.11 Done installing documentation for bson, genghisapp after 1 seconds 2 gems installed
C:\Users\kk>gem list |find "bson" bson (3.2.1, 1.9.2)
but ...
C:\Users\kk>genghisapp \ Notice: The native BSON extension was not loaded. **
For optimal performance, use of the BSON extension is recommended.
To enable the extension make sure ENV['BSON_EXT_DISABLED'] is not set
and run the following command:
gem install bson_ext
If you continue to receive this message after installing, make sure that
the bson_ext gem is in your load path.
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- win32/process (LoadError) from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_req uire.rb:55:in
require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/backports-3.6.6/lib/backport
s/std_lib.rb:9:in require_with_backports' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/vegas-0.1.11/lib/vegas/runne r.rb:8:in
<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/genghisapp-2.3.11/bin/genghi
sapp:12:in <top (required)>' from C:/Ruby22-x64/bin/genghisapp:23:in
load'
from C:/Ruby22-x64/bin/genghisapp:23:in `
uninstall bson 1.9.2
C:\Users\kk>gem uninstall bson --version 1.9.2
You have requested to uninstall the gem: bson-1.9.2
mongo-1.9.2 depends on bson (~> 1.9.2) If you remove this gem, these dependencies will not be met. Continue with Uninstall? [yN] y Remove executables: b2json, j2bson
in addition to the gem? [Yn] y Removing b2json Removing j2bson Successfully uninstalled bson-1.9.2
C:\Users\kk>gem list |find "bson" bson (3.2.1)
C:\Users\kk>genghisapp
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:313:in to_specs': Could not find 'bson' (~> 1.9.2) - did find: [bson-3.2.1] (Gem::LoadError) Checked in 'GEM_PATH=C:/Users/kk/.gem/ruby/2.2.0;C:/Ruby22-x64/lib/ruby/gems/2.2 .0', execute
gem envfor more information from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13 17:in
block in activate_dependencies'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13
06:in each' from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13 06:in
activate_dependencies'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:12
88:in activate' from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13 20:in
block in activate_dependencies'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13
06:in each' from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:13 06:in
activate_dependencies'
from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/specification.rb:12
88:in activate' from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem .rb:54:in
gem'
from C:/Ruby22-x64/bin/genghisapp:22:in `
C:\Users\kk>gem list |find "mongo" mongo (1.9.2)
C:\Users\kk>gem list |find "bson" bson (1.9.2) bson_ext (1.9.2)
C:\Users\kk>gem list |find "genghisapp" genghisapp (2.3.11)
still doesn't wrok ~~~
C:\Users\kk>genghisapp
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- win32/process (LoadError) from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_req uire.rb:55:in
require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/backports-3.6.6/lib/backport
s/std_lib.rb:9:in require_with_backports' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/vegas-0.1.11/lib/vegas/runne r.rb:8:in
<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/genghisapp-2.3.11/bin/genghi
sapp:12:in <top (required)>' from C:/Ruby22-x64/bin/genghisapp:23:in
load'
from C:/Ruby22-x64/bin/genghisapp:23:in `
Oh! I didn't notice you're on Windows, and I was thrown by the two BSON versions, so I figured that was your issue.
Try running with genghisapp -F
?
error~~~
C:\Users\kk>genghisapp -F
C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- win32/process (LoadError) from C:/Ruby22-x64/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_req uire.rb:55:in
require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/backports-3.6.6/lib/backport
s/std_lib.rb:9:in require_with_backports' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/vegas-0.1.11/lib/vegas/runne r.rb:8:in
<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/genghisapp-2.3.11/bin/genghi
sapp:12:in <top (required)>' from C:/Ruby22-x64/bin/genghisapp:23:in
load'
from C:/Ruby22-x64/bin/genghisapp:23:in `
C:\Users\kk>gem list | find "bson" bson (1.9.2) bson_ext (1.9.2)
Yeah, this is likely windows process control related, not BSON related. That's what the -F
flag was supposed to fix :(
Keep on going! :)
I had these issue on freshly installed genghis. I did following to fix:
$ gem install specific_install
$ gem specific_install -l https://github.com/bobthecow/genghis
# uninstall all versions of mongo, bson and bson_ext
$ gem uninstall mongo bson bson_ext
$ gem install mongo -v "1.9.2"
$ gem install bson_ext -v "1.9.2"
$ genghisapp
[2016-01-26 20:21:47 -0800] Starting 'genghisapp'...
[2016-01-26 20:21:47 -0800] trying port 5678...
$
If you have newer version of mongo
than 1.9.2, genghis loads it as described in file src/rb/genghis/helpers.rb:64
installed = Gem::Specification.find_all { |s| s.name == 'mongo' }.map { |s| s.version }.sort.last
Thanks for your help.
Restart required You have recently installed the bson_ext extension. Run genghisapp --kill then restart genghisapp to use it.
I restarted the app but it still shown. How can I avoid that message?