You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org> on 2011/11/09 22:37:52 UTC

[jira] [Commented] (THRIFT-1424) Ruby specs fail when run with rake

    [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147311#comment-13147311 ] 

Jake Farrell commented on THRIFT-1424:
--------------------------------------

Will take a look at this tonight, thanks
                
> Ruby specs fail when run with rake
> ----------------------------------
>
>                 Key: THRIFT-1424
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1424
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>    Affects Versions: 0.8
>            Reporter: Peter Sanford
>            Priority: Minor
>         Attachments: 0001-Update-relative-spec-require-lines.patch
>
>
> If I run rake in the rb directory the specs fail to load the spec_helper:  
> {code}
> spec/serializer_spec.rb:23:in `require': no such file to load -- spec/spec_helper (LoadError)
>         from spec/serializer_spec.rb:23:in `<top (required)>'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `load'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `block in load_files'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `each'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `load_files'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/options.rb:134:in `run_examples'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/bin/spec:5:in `<main>'
> rake aborted!
> {code}
> If I cd into the spec dir and run 'spec *spec.rb' everything works. 
> The problem is all the spec files require the spec_helper via:
> {code}
> require File.dirname(__FILE__) + '/spec_helper'
> {code}
> This will expand the dirname relative to where ruby was invoked. Changing this to:
> {code}
> require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
> {code}
> will fix this issue. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira