Closed niksosf closed 14 years ago
Have you tried installing the DevKit and then doing a plain gem install eventmachine
? The DevKit will compile the latest version of EM for you on install. This is what I did and it works great (after I realised I also had to gem install win32-event
- see this issue).
What kind of Ruby are you using? I've tried it both with Ruby 1.8.7 from Ruby Installer and with Ruby 1.8.7 from an ancient (but latest) InstantRails release.
@charlesr Thanks for stepping in, and thanks for the pointer to DevKit.
@charlesr, On the side note, on another computer, I have both 191 and devkit installed and the msvcrt-ruby18.dll thing came up, but then I found a discussion of it saying that 191 is basically not yet supported, so I retreated back to 187.
Now, I downloaded the DevKit from the one-click installer website, extracted it to where the bin folder is and changed the path in fstab as instructed in the readme file. I had done this for 191, so I think it should be the same. C:\Users\Nik\bakery>livereload
Version: 1.4 (compatible with browser extension versions 1.4.x) Port: 35729 Watching: C:/Users/Nik/bakery
LiveReload is waiting for browser to connect.
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- win32 /event (LoadError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
from C:/Ruby187/lib/ruby/gems/1.8/gems/win32-changenotify-0.5.1/lib/win32/changenotify.rb:1
from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
require'
from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/platform/windows/monitor.rb:4
@andreyvit I tried this: first I used the one-click installer, that didn't work as above, so I then first installed the PIK gem, the RVM on Windows. I use c:\pik install ruby-1.8.7 to install another version of 1.8.7 in a separate location. I switch to this new installation of Ruby by c:\pik use 187 choosing 2 for my second installation of 187 then I redo the gem installations for eventmachine, win32-changenotify, and livereload
Unluckily, it gave the exact same message as above.
The above trials, namely, installing testing livereload on 191, 187-one-click, 187-pik, have been tried on three systems. One on Windows 7 32bit Ultimate, one on Windows 7 64bit ultimate, and one on Windows Vista business 32bit. I have also tried them in prompts that are standard and elevated, just in case.
Please install win32-event gem, we've basically screwed up installation instructions (forgot to mention the gem).
@andreyvit Hey it works! on all but Win7 box that has cmd.exe always run in Administrator mode. Not that this will affect anyone, but do you happen to have an idea why a more privilegedly run cmd actually gets an error? ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
C:\Users\Nik>gem list
* LOCAL GEMS *
addressable (2.2.0) em-dir-watcher (0.9.4) em-websocket (0.1.3) eventmachine (0.12.10) livereload (1.4) pik (0.2.8) ruby-json (1.1.2) win32-api (1.4.6 x86-mingw32) win32-changenotify (0.5.1) win32-event (0.5.2) win32-ipc (0.5.3) windows-api (0.4.0) windows-pr (1.0.9)
C:\Users\Nik>livereload
Version: 1.4 (compatible with browser extension versions 1.4.x) Port: 35729 Watching: C:/Users/Nik
open': Permission denied - C:/U sers/Nik/Local Settings (Errno::EACCES) from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:39:in
entries'
from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:39:in compute_entry_name s' from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:50:in
compute_entries'
from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:72:in refresh!' from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:76:in
refresh!'
from C:/Ruby187/lib/ruby/1.8/set.rb:195:in each' from C:/Ruby187/lib/ruby/1.8/set.rb:195:in
each_key'
from C:/Ruby187/lib/ruby/1.8/set.rb:195:in each' from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:76:in
refresh!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/tree.rb:173:in initialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/monitor.rb:21:in
new'
from C:/Ruby187/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/monitor.rb:21:in watch' from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/../lib/livereload.rb:175:in
restart_watching'
from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/../lib/livereload.rb:243:in run' from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/../lib/livereload.rb:243:in
each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/../lib/livereload.rb:243:in run' from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
call'
from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine' from C:/Ruby187/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/../lib/livereload.rb:215:in run' from C:/Ruby187/lib/ruby/gems/1.8/gems/livereload-1.4/bin/livereload:51 from C:/Ruby187/bin/livereload:19:in
load'
from C:/Ruby187/bin/livereload:19C:\Users\Nik>
I'm not a big Win 7 pro, but let me guess: Administrator user does not have access to C:/Users/Nik/Local Settings
. (Note that, unlike root on Unix, administrators do not have all the possible access rights on Windows.)
I guess we could ignore EACCES. On the other hand, running livereload to monitor your entire home directory does not work too well anyway (it has to keep the directory tree in memory to compute changes.) Try monitoring some specific folder(s) instead.
you are right on the mark. It is because I ran in in my home dir, when I thought I was running in my rails app dir. It works fine now even under administrator cmd. Case solved.
Thank You, Andreyvit and Charlesr.
Great, closing this issue.
So I have two clean machines vista/7, installed Ruby 1.8.7 from the installer. I installed all rails gems and stuff then eventmachine 'gem install eventmachine --platform=win32' fails telling you to checkout some log. I searched for a few hours and found that there's a way to install gems locally, so I downloaded the eventmachine win32 0.12.10 gem and gem install --local "c:\path\to\the.gemfile" And eventmachine installed
then I installed the changenotify thing and livereload thing without problem. when I do c:\rails\demo_app\livereload
this line gives problem
c:\Ruby-187-p299/lib/ruby/gems/1.8/gems/em-dir-watcher-0.9.4/lib/em-dir-watcher/platform/windows/monitor.rb:4
Though both Chrome and Safari for Windows activated the livereload feature without problem, but they are not getting any refreshes. Possibly because nothing is being watched.