After I read the documentation to make Livereload work in drupal with omega 4 theme, I run this command "drush omega-guard" in subtheme directory but i get errors, and i made sure i downloaded all ruby gems and dependicies

I get this error:

D:\xampp\htdocs\omega4test\sites\all\themes\subtheme>bundle exec guard
D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/interactor.rb:8:in `require': cannot load such file -- pry (LoadError)
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/interactor.rb:8:in `<class:Interactor>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/interactor.rb:6:in `<module:Guard>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/interactor.rb:1:in `<top (required)>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/dsl.rb:38:in `require'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/dsl.rb:38:in `<class:Dsl>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/dsl.rb:34:in `<module:Guard>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard/dsl.rb:1:in `<top (required)>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard.rb:10:in `require'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard.rb:10:in `<module:Guard>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/lib/guard.rb:8:in `<top (required)>'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/bin/guard:3:in `require'
        from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/guard-1.8.1/bin/guard:3:in `<top (required)>'
        from D:/Ruby200-x64/bin/guard:23:in `load'
        from D:/Ruby200-x64/bin/guard:23:in `<main>'

If you need more info, let me know Thanks

Comments

fubhy’s picture

Status: Active » Fixed

try gem install pry

idealdesigns’s picture

I installed it, same
maybe thats windows 7 issue, in linux maybe it works smoother

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

caspercash’s picture

Status: Closed (fixed) » Active

I am very sorry to open this issue again but I still got this errors. Is this really a Windows 7 issue? Aren't there any fix to this? I tried the gem install pry but still got these errors. Please see here->http://screencast.com/t/fYjgOprbuo.

Anonymous’s picture

I was having a similar error with wdm instead of pry.

I added these lines before "end" on gemfile:

  require 'rbconfig'
  gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i

and it was corrected.

Using windows 8 (Zend Framework) and drush ogrd.

I hope this would help.

Maybe this line or something similar should be added to gemfile for windows systems...

caspercash’s picture

Thank you very much phpcitizen! I tried adding those lines in my themes gemfile and replaced 'wdm' with 'pry'. And a new LoadError occurred which was 'wdm' so I run 'gem install wdm' and added it in the themes gemfile. The themes gemfile looks like the same as below:

require 'rbconfig'
gem 'pry', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i

When I first run 'drush omega-guard mytheme' it shows this error:

There was a problem with your setup:                                                         [error]
Resolving dependencies...
The Gemfile's dependencies are satisfied

So I run it again and it did run but there are a couple of errors being displayed:

DL is deprecated, please use Fiddle
For a better pry experience, please use ansicon: http://adoxa.3eeweb.com/ansicon/
Compilation took 0.136s
11:34:02 - INFO - You must 'gem install win32console' to use color on Windows
11:34:02 - ERROR - Could not load 'guard/livereload' or find class Guard::Livereload
11:34:02 - ERROR - cannot load such file -- eventmachine
11:34:02 - ERROR - Invalid Guardfile, original error is:
> [#] undefined method `new' for nil:NilClass
11:34:02 - INFO - Guard::Compass is waiting to compile your stylesheets.
11:34:02 - INFO - Guard is now watching at 'c:/www/drupal/sites/all/themes/mytheme'

[1] guard(main)>
[1] guard(main)> [1] guard(main)>

The guard is running but the livereload isn't working. Do you have any idea? By the way, I am running on Windows 7 OS and my gem list are the following:

*** LOCAL GEMS ***

addressable (2.3.5, 2.3.4)
bigdecimal (1.2.0)
blend-mode (0.0.1)
breakpoint (2.0.7, 2.0.5)
bundler (1.3.5)
chunky_png (1.2.8)
coderay (1.0.9)
color-schemer (0.2.7, 0.2.3)
compass (0.12.2)
compass-blend-modes (0.0.2)
compass-normalize (1.4.3)
compass-rgbapng (0.2.1, 0.1.1)
compass-validator (3.0.1)
css_parser (1.3.5, 1.3.4)
em-websocket (0.5.0)
formatador (0.2.4)
fssm (0.2.10)
guard (1.8.3, 1.8.0)
guard-compass (0.0.8, 0.0.6)
guard-livereload (1.4.0)
guard-shell (0.5.1)
io-console (0.4.2)
json (1.7.7)
listen (1.3.1, 1.1.1)
lumberjack (1.0.4, 1.0.3)
method_source (0.8.2)
minitest (4.3.2)
multi_json (1.8.0, 1.7.3)
oily_png (1.1.0)
pry (0.9.12.2)
pry-rails (0.3.2)
psych (2.0.0)
rake (0.9.6)
rb-fchange (0.0.6)
rb-fsevent (0.9.3)
rb-inotify (0.9.2, 0.9.0)
rb-kqueue (0.2.0)
rb-readline (0.5.0)
rdoc (4.0.0)
sass (3.2.10, 3.2.9)
sass-globbing (1.1.0, 1.0.0)
sassy-strings (1.0.0, 0.3.1)
singularitygs (1.1.2, 1.0.8)
slop (3.4.6)
susy (1.0.9, 1.0.8)
test-unit (2.0.0.0)
thor (0.18.1)
toolkit (1.3.8, 1.0.0)
wdm (0.1.0)
win32console (1.3.2)

Thank you!

fubhy’s picture

Assigned: idealdesigns » Unassigned
Priority: Major » Normal

I was having a similar error with wdm instead of pry.

I added these lines before "end" on gemfile:

require 'rbconfig'
gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
and it was corrected.

Using windows 8 (Zend Framework) and drush ogrd.

I hope this would help.

Maybe this line or something similar should be added to gemfile for windows systems...

Can someone verify that this works? I am fine with adding Windows specific (oh god Windows, why do you suck so much?!) entries to the Gemfile (we already have some) if that fixes this issue. However, I don't have any Windows machine I could test this on.

Anonymous’s picture

caspercash: I suspect you are using ruby 2+, I just upgraded it and having the same errors you have.

Would better use 1.9+ for now. But the line for wdm is needed for me.

caspercash’s picture

phpcitizen: Yes you are right! I am using ruby 2+. Okay I will be downgrading to 1.9+ and see if this works. Phew, I really hope it will. Until now, I couldn't use the livereload! Tsk. By the way, do you have any idea how to downgrade ruby or maybe a couple of blogs instructing how to?

Thank you very much for the help fubhy and phpcitizen!

DrupalFrank’s picture

Any updates on this? I find myself in exactly the same spot; Windows7, new to Ruby (never used before), and trying to get drush omega-guard to work (like in the leveluptuts #9 tutorial of Omega4 theme).

Getting the same errors as caspercash and also running Ruby 2.0.0 (installed using the RubyInstaller from rubyinstaller.org). Also went through getting devkit etc so oily_png woudl build etc. (All this to get SaaS working?)

Added following to my Gemfile too...

  require 'rbconfig'
  gem 'pry', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
  gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i

If I have to downgrade; is there a clean way to do it?

Thanks in advance for any insight.

varshith’s picture

I am using Windows 7 and used Ruby installer.
Same situation as DrupalFrank

After adding these lines

  require 'rbconfig'
  gem 'pry', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i
  gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i

I still couldn't start guard. Some problem with livereload
I commented out the livereload stuff in the Guardfile and I was able to get guard running.

  #guard :livereload do
  #  watch(%r{^((?!\.normalize\.).)*\.(css|js)$})
  #end
DrupalFrank’s picture

Commenting the livereaload functionality looks like it will prevent the automatic compilation of the sass files. I'd still like to have that working.

Will be installing Ruby 1.9.3-p484 (using rubyinstaller.org) soon to see if that resolves the issues. Will post back later with the results.

DrupalFrank’s picture

Some progress, thought I would share (yes looks like Ruby 2.0.0 is the culprit; going to 1.9.3 seems better)...

Since I'm running my Drupal7 Win32 development environment in a Virtual Machine (VirtualBox), I went back to a snapshot of the machine before Ruby 2.0.0 had been installed and instead installed Ruby 1.9.3 using the Windows installer and also the matching devkit from the same website. (rubyinstaller.org)

From my subtheme folder in command console ran the following commands to catch the VM image back up to where it needed to be. This time I saw no warnings or errors.

gem install bundler
bundle install
drush omega-guard

Now the drush omega-guard command produced the following result instead of error messages...

Compilation took 3.825s
09:05:29 - INFO - Guard::Compass is waiting to compile your stylesheets.
09:05:29 - INFO - Guard is now watching at 'C:/BitNami/drupal-7.26-0/apps/drupal/htdocs/sites/all/themes/raptor_omega'
09:05:29 - INFO - LiveReload is waiting for a browser to connect.
  Please add the following to your Gemfile to avoid polling for changes:
    require 'rbconfig'
    gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

[Listen warning]:

[1] guard(main)>
BrianVu’s picture

Any updates on how to get this working on a Windows machine?

wimberb’s picture

It appears that the problem is with guard 2.x. According to this thread https://github.com/guard/listen/issues/149 nobody on the guard development team has a windows machine so they are having a hard time troubleshooting the problem with wdm and guard. Perhaps someone who has a clue about any of this can help them locate the problem.

DamienMcKenna’s picture

Version: 7.x-4.0-beta4 » 7.x-4.x-dev
JussaguyDesign’s picture

RUBY 2.X.X is definitely the issue. Use RUBY 1.9.3. When you use RUBY 1.9.3 you may have to install each GEM individually. "bundle install" command did not work for me. It takes about 20mins to install each gem individually, but everything seems to work for me on a Windows 7 32 bit platform.

sarathkm’s picture

After hitting Lode Error with Ruby 2.2.2 for 'hitimes'. I decided to try installing using Ruby 1.9.3 and the problem is solved with no errors on my Windows 7 machine.
The Steps I followed were like this:
1. Downloaded Ruby 1.9.3 and DevKit for 1.9.3 fromrubyinstaller.org
2. After installing Ruby 1.9.3, add the PATH ENV variable so that I can start using from terminal.
3. Extracted DevKit and followed Quick Start guide from github for rubyinstaller development kit. This step is required for wdm (I guess).
4. Then ran gem install wdm. That installed wdm to my local machine.
5. Then I moved on to my newly created omega subtheme directory and ran drush ogrd. This tells me to install bundler.
6. I installed bundler with gem install bundle .
7. Next, I typed again drush ogrd. This time it shows to install dependencies using bundle install.
8. However bundle install doesn't work in 1.9.3 but displays a list of bundle to install. Installed gem bundle one by one with gem install bundlename. (one of guard bundle depends on most other dependencies listed when typed bundle install so I think it is better to install guard bundle as it installs most other bundle and check again by typing bundle install, this will save your time.)
9. Next after installing all the bundle. I get my drush ogrd get working with few INFO messages and polling issue with
'wdm'. You will see a message to add a line to Gemfile. Please do so in your new omega sub theme directory where you will find The Gemfile and add as specified gem 'wdm', '>= 0.1.0' if Gem.win_platform? before end or/and after developement do.(note: this may change as I see above note from #13, this line to be different for him. So do add the line as you see in your terminal.)

Also, after all this you fail to load livereload.js (you may checkout that you have livereload server running on broswer window by typing this url: http://localhost:35729/livereload.js), you would like to consider windows livereload app from livereload.com. After installing this app you will see js script on the same URL as what it should show. Note that you will have to keep this app running while you want livereload running on omega 4.

Restart your terminal and hope you will see your SASS working in conjection with CSS.

sarathkm’s picture

May be this helps someone
https://www.drupal.org/node/2204227

8bernard8’s picture

I have just inatlled drupal 7.38 with omega 4 and made by drush new subtheme, also made new layout (copy sass from omega folder and renamed).
While starting drush omega-guard i have some issues with layout. Anybody knows what is it ?

layout.scss (Line 19: Invalid CSS after " flow": expected ")", was ": ltr,")

this is line #19

$susy: (
  flow: ltr,
  math: fluid,
  output: float,
  gutter-position: after,
  container: 1200px,
  container-position: center,
  columns: 4,
  gutters: 1/4,
  column-width: 4em,
  global-box-sizing: content-box,
  last-flow: to,
);
pkiff’s picture

@8berbard8: This does not look like an omega-guard problem, but a SASS coding problem in relation to the omega implementation of susy. I'd recommend starting a new issue marked as a support request. Be sure to identify which specific 4.x version of omega you are running when you create the topic.

steinmb’s picture

Status: Active » Fixed

Consider this answered. Pls. do not re-open this again. Any new issues goes in new issues, pretty please with sugar on top.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.