windows - Kan ikke starte SOLR-serveren (Ruby on Rails)

Indlæg af Hanne Mølgaard Plasc

Problem



Jeg bruger sunspot\_rails og sunspot gems i min Rails3 ansøgning og følger trinene for at installere solcreme på https://github.com/outoftime/sunspot, jeg kan ikke få min solspotserver til at køre. [6]


Når jeg går ind i mit bibliotek, skal du køre bundler og derefter køre rake sunspot: solr: start Jeg får følgende fejl


Emil@Emil-PC /cygdrive/c/work/pilarhq
$ rake sunspot:solr:start
(in /cygdrive/c/work/pilarhq)
DEPRECATION WARNING: You are using the old router DSL which will be removed in R
ails 3.1. Please check how to update your routes file at: http://www.engineyard.
com/blog/2010/the-lowdown-on-routes-in-rails-3/. (called from /cygdrive/c/work/p
ilarhq/config/routes.rb:1)
      2 [main] ruby 4824 C:cygwinin
uby.exe: *** fatal error - unable to rem
ap C:cygwinincyglber-2-3-0.dll to same address as parent: 0x360000 != 0x3800
00
Stack trace:
Frame     Function  Args
023F9538  6102749B  (023F9538, 00000000, 00000000, 00000000)
023F9828  6102749B  (61177B80, 00008000, 00000000, 61179977)
023FA858  61004AFB  (611A136C, 6123FF54, 00360000, 00380000)
End of stack trace
      2 [main] ruby 4500 C:cygwinin
uby.exe: *** fatal error - unable to rem
ap C:cygwinincyglber-2-3-0.dll to same address as parent: 0x360000 != 0x3E00
00
Stack trace:
Frame     Function  Args
023FB0F8  6102749B  (023FB0F8, 00000000, 00000000, 00000000)
023FB3E8  6102749B  (61177B80, 00008000, 00000000, 61179977)
023FC418  61004AFB  (611A136C, 6123FF54, 00360000, 003E0000)
End of stack trace
      2 [main] ruby 4612 fork: child 4824 - died waiting for dll loading, errno
11
      4 [main] ruby 580 fork: child 4500 - died waiting for dll loading, errno 1
1
/usr/lib/ruby/gems/1.8/gems/sunspot-1.2.0/lib/sunspot/server.rb:42:in `fork': Re
source temporarily unavailable - fork(2) (rake aborted!Errno::EAGAIN)

Resource temporarily unavailable - fork(2)      from /usr/lib/ruby/gems/1.8/gems
/sunspot-1.2.0/lib/sunspot/server.rb:42:in `start'
$
in `fork'
        from /usr/lib/ruby/gems/1.8/gems/sunspot-1.2.0/lib/sunspot/server.rb:41:
in `start'
        from /usr/lib/ruby/gems/1.8/gems/sunspot\_rails-1.2.0/lib/sunspot/rails/s
erver.rb:10:in `start'
        from /usr/lib/ruby/gems/1.8/gems/sunspot\_rails-1.2.0/lib/sunspot/rails/t
asks.rb:8
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'

        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'

        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke\_w
ith\_call\_chain'
        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke\_w
ith\_call\_chain'ygdrive/c/work/pilarhq
$       from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke\_
task'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top\_lev
el'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top\_lev
el'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standar
d\_exception\_handling'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top\_lev
el'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standar
d\_exception\_handling'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
        from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
        from /usr/bin/rake:19:in `load'
        from /usr/bin/rake:19


(Jeg bruger Cygwin på en Windows-maskine ... hvis det hjælper)

Bedste reference


Jeg har fundet http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/og måtte gøre følgende: [7]



  1. Luk alle cygwin-vinduer

  2. ring c: \ cygwin \ usr \ bin \ ash fra Run (Win-R)

  3. ring rebaseall derfra


Andre referencer 1


Jeg løb ind i noget lignende (Windows 7-virksomhed, ved hjælp af cygwin og skinner) og fandt ud af, at den enkle rebaseall tilgang ikke fungerede. Kort sagt, problemet er, at rebaseall ikke nødvendigvis kender alle .dll'erne og så skal det rettes. Løsningen er at komponere din egen liste og køre igen med denne liste ved hjælp af -T-indstillingen. For mig var den proces, der endelig fungerede:



  1. i en cygwin shell: find /bin /lib /usr -iname '*.so' > /tmp/to\_rebase.lst

  2. i en cygwin shell: find /bin /lib /usr -iname '*.dll' >> /tmp/to\_rebase.lst

  3. Afslut alle cygwin-skaller og stop alle cygwin-processer

  4. Kør som administrator C: \ cygwin \ bin \ ash.exe

  5. /bin/rebaseall -T /tmp/to\_rebase.lst

  6. Afslut aske

  7. genstart maskinen