Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling not working #8

Open
rvr opened this issue Sep 5, 2012 · 5 comments
Open

Compiling not working #8

rvr opened this issue Sep 5, 2012 · 5 comments

Comments

@rvr
Copy link

rvr commented Sep 5, 2012

When I run $ wordless compile I get a bunch of errors, then it says 'Compiled static assets', but nothing has been updated.

$ wordless compile
PHP Strict Standards:  Declaration of LessPreprocessor::process_file() should be compatible with that of WordlessPreprocessor::process_file() in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/preprocessors/less_preprocessor.php on line 129

Strict Standards: Declaration of LessPreprocessor::process_file() should be compatible with that of WordlessPreprocessor::process_file() in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/preprocessors/less_preprocessor.php on line 129
Problems compiling /Users/river/Sites/joshgold/wp-content/themes/jg2012/theme/assets/javascripts/application.js.coffee to /Users/river/Sites/joshgold/wp-content/themes/jg2012/assets/javascripts/application.js

WordlessCompileException: [0]: Failed to run the following command: '/usr/bin/ruby' '/Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/preprocessors/sprockets_preprocessor.rb' 'compile' '/Users/river/Sites/joshgold/wp-content/themes/jg2012/theme/assets/javascripts/application.js.coffee' '--paths' '/Users/river/Sites/joshgold/wp-content/themes/jg2012/assets/javascripts' '/Users/river/Sites/joshgold/wp-content/themes/jg2012/theme/assets/javascripts'

Output error:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- thor (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/preprocessors/sprockets_preprocessor.rb:5


PHP Notice:  Undefined variable: compiled_content in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/wordless.php on line 131

Notice: Undefined variable: compiled_content in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/wordless.php on line 131
Problems compiling /Users/river/Sites/joshgold/wp-content/themes/jg2012/theme/assets/stylesheets/screen.sass to /Users/river/Sites/joshgold/wp-content/themes/jg2012/assets/stylesheets/screen.css

WordlessCompileException: [0]: The path /usr/bin/compass doesn't seem to be an executable!

Output error:

PHP Notice:  Undefined variable: compiled_content in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/wordless.php on line 131

Notice: Undefined variable: compiled_content in /Users/river/Sites/joshgold/wp-content/plugins/wordless/wordless/wordless.php on line 131
Compiled static assets.
@rvr
Copy link
Author

rvr commented Sep 5, 2012

I'm using the gem with RVM and Ruby 1.9.3 on OS X 10.8. Here are my local gems in the gemset:

*** LOCAL GEMS ***

bundler (1.2.0, 1.1.5, 1.1.4)
chunky_png (1.2.6)
compass (0.12.2)
fssm (0.2.9)
hike (1.2.1)
multi_json (1.3.6)
rack (1.4.1)
rake (0.9.2.2)
rubygems-bundler (1.0.3)
rvm (1.11.3.5)
sass (3.2.1)
sprockets (2.5.0)
thor (0.16.0)
tilt (1.3.3)
wordless (0.2.1)
wordpress_tools (0.0.1)

@rvr
Copy link
Author

rvr commented Sep 5, 2012

OK, I got it working. I switched to 1.8.7 thinking it might be a Ruby problem. That didn't fix it, and then I realized I hadn't updated the permalinks settings, so I did that. I ran into permissions issues and once I resolved that it looks like it's ok. I don't get the errors any more when I run the compile command.

The issue now is that it seems I have to run the compile command every time I make a change? I thought it should be updating automatically. Anything else I need to do for that to work?

@etienne
Copy link
Owner

etienne commented Sep 19, 2012

Sorry for the delay. I'm puzzled by the fact that updating your permalinks settings fixed the problem. It seems to me that Wordless was loading the system Ruby rather than the correct RVM-installed Ruby. Not sure whether the problem is RVM, Wordless or something in your configuration.

One thing's for sure, the gem should not report "Compiled static assets." when it actually failed. That's definitely an issue with the gem.

As for auto-updating, the compile command is not meant for that. You're supposed to rely on dynamic assets generation in development, and only use the compile command when you're ready to deploy. Typically you'd include the compile command in your deployment script, if you have one. If you don't have one, you'll need to manually run wordless compile every time unfortunately.

@rvr
Copy link
Author

rvr commented Sep 19, 2012

Yeah, I'm only using 'wordless compile' because dynamic asset generation is not working. It appears to be an issue with the gem and maybe bundler? The closest I've gotten is seeing some other references to Git-based gems not working properly. Most of the references I've seen are related to running Passenger or other specific environments, though.

https://stackoverflow.com/questions/6648870/is-not-checked-out-bundle-install-does-not-fix-help
https://www.ruby-forum.com/topic/213962
basecamp/pow#24

Seems like it's something to do with the interaction of the gem and RVM or Bundler, though. Way beyond my expertise, but maybe you can figure out where the issue is coming from.

@rvr
Copy link
Author

rvr commented Sep 19, 2012

Relevant error output copied from the Wordless issue.

/************************
WordlessCompileException: [0]: Failed to run the following command: '/Users/river/.rvm/bin/wordless_compass' 'compile' '/Users/river/Sites/joshgold/wp-content/themes/jg2012/tmp' '--config' '/Users/river/Sites/joshgold/wp-content/themes/jg2012/tmp/compass_configcOLGO5'
Generated config:
http_path = "./"
http_images_dir = "../images"
images_dir = "../assets/images"
http_fonts_dir = "../fonts"
fonts_dir = "../assets/fonts"
css_path = "/Users/river/Sites/joshgold/wp-content/themes/jg2012/tmp"
relative_assets = false
output_style = :compressed
environment = :production
sass_path = "/Users/river/Sites/joshgold/wp-content/themes/jg2012/theme/assets/stylesheets"

Output error:

/Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/source.rb:801:in `load_spec_files': https://github.com/etienne/wordless_gem.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/source.rb:381:in `local_specs'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/source.rb:774:in `specs'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/lazy_specification.rb:53:in `__materialize__'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/spec_set.rb:86:in `materialize'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/spec_set.rb:83:in `map!'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/spec_set.rb:83:in `materialize'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/definition.rb:113:in `specs'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/gems/bundler-1.2.0/lib/bundler/environment.rb:27:in `specs'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75
from /Users/river/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `gem_original_require'
from /Users/river/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require'
from /Users/river/.rvm/gems/ruby-1.8.7-p370@wordless/bin/ruby_noexec_wrapper:9
************************/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants