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

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

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

        

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

Posted by "Jake Farrell (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1424.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8
         Assignee: Peter Sanford

Committed, thanks for the patch
                
> 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
>            Assignee: Peter Sanford
>            Priority: Minor
>             Fix For: 0.8
>
>         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

        

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

Posted by "Peter Sanford (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Sanford updated THRIFT-1424:
----------------------------------

    Patch Info: Patch Available
    
> 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

        

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

Posted by "Peter Sanford (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Sanford updated THRIFT-1424:
----------------------------------

    Attachment: 0001-Update-relative-spec-require-lines.patch

Patch to fix this issue.
                
> 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

        

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

Posted by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147426#comment-13147426 ] 

Hudson commented on THRIFT-1424:
--------------------------------

Integrated in Thrift #330 (See [https://builds.apache.org/job/Thrift/330/])
    Thrift-1424:Ruby specs fail when run with rake
Client: ruby
Patch: Peter Sanford

Fixes specs failing to load the spec_helper in ruby 1.9.2

                
> 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
>            Assignee: Peter Sanford
>            Priority: Minor
>             Fix For: 0.8
>
>         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