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

Undefined method exception when using `compass watch' in jruby 1.7.8. #1245

Closed
ghost opened this issue Nov 20, 2013 · 4 comments
Closed

Undefined method exception when using `compass watch' in jruby 1.7.8. #1245

ghost opened this issue Nov 20, 2013 · 4 comments
Milestone

Comments

@ghost
Copy link

@ghost ghost commented Nov 20, 2013

I'm calling compass from scripting container.
When trying to use 'compass watch' command.

The following error occurs:

NoMethodError on line ["87"] of path/to/gems/fssm-0.2.10/lib/fssm/path.rb: undefined method `is_virtual?' for <Pathname:/tmp/1384933325506-0>:Pathname

I checked the code of fssm. And found that Pathname is a class extending ruby's default Pathname class. And it has a method `is_virtual?'

https://github.com/ttilley/fssm/blob/master/lib/fssm/pathname.rb
https://github.com/ttilley/fssm/blob/master/lib/fssm/path.rb

However, this method is_virtual? is not recognized by jruby.

I also tried to call 'compass watch' from command line using jruby. The error is the same.

Since it runs successfully in MRI. I suppose this is a bug of jruby.

Please check it.

@ghost
Copy link
Author

@ghost ghost commented Nov 20, 2013

Stacktrace:

NoMethodError on line ["87"] of /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm/path.rb: undefined method `is_virtual?' for <Pathname:/tmp/1384937452168-0>:Pathname
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm/path.rb:4:in `initialize'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm/monitor.rb:32:in `create_path'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm/monitor.rb:8:in `path'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:91:in `perform'
  org/jruby/RubyArray.java:1613:in `each'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:88:in `perform'
  org/jruby/RubyProc.java:271:in `call'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm/support.rb:68:in `use_block'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/fssm-0.2.10/lib/fssm.rb:68:in `monitor'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:87:in `perform'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /home/yxd/playspace/compass-maven-plugin/target/test-classes/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  <script>:10:in `init'
  org/jruby/RubyProc.java:271:in `call'
@neokeats
Copy link

@neokeats neokeats commented Dec 5, 2013

Hi,
same bug with jruby on windows.

@enebo
Copy link
Member

@enebo enebo commented Dec 5, 2013

Hmm this actually works on master but not on 1.7 branch. I will see if I can quickly bisect this.

enebo added a commit that referenced this issue Dec 5, 2013
…ruby 1.7.8. This is actually a regression from native Pathname addition. Some methods which should use class of caller was instead using Pathname. This is far from clear since some Pathname methods do seem to use Pathname and not subclass.
@enebo
Copy link
Member

@enebo enebo commented Dec 5, 2013

Thanks for the second reminder on this as compass was completely broken.

@enebo enebo closed this in c458fbc Dec 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants