davetron5000 / optparse-plus

Start your command line scripts off right in Ruby
http://davetron5000.github.com/optparse-plus
Apache License 2.0
521 stars 54 forks source link

New project rake/test issue #91

Closed lebogan closed 9 years ago

lebogan commented 9 years ago

I am building a project via the online tutorial: https://github.com/davetron5000/methadone/wiki/Tutorial_Bootstrap

Out of the box, bundle install gives me: Fetching gem metadata from https://rubygems.org/......... Fetching version metadata from https://rubygems.org/.. Resolving dependencies... Using rake 10.4.2 Using ffi 1.9.8 Using childprocess 0.5.6 Using builder 3.2.2 Using multi_json 1.11.0 Using gherkin 2.12.2 Using cucumber-core 1.1.3 Using diff-lcs 1.2.5 Using multi_test 0.1.2 Using cucumber 2.0.0 Using rspec-support 3.2.2 Using rspec-expectations 3.2.1 Using aruba 0.6.2 Using bundler 1.9.9 Using methadone 1.9.0 Using fullstop 0.1.0 from source at . Using rdoc 4.2.0 Bundle complete! 5 Gemfile dependencies, 17 gems now installed. Use bundle show [gemname] to see where a bundled gem is installed.

Running rake as per instructions give: methadone/fullstop/test/tc_something.rb:1:in require': cannot load such file -- test/unit (LoadError) from /home/lewisb/src/ruby/sandbox/methadone/fullstop/test/tc_something.rb:1:in<top (required)>' ... rake aborted!

Add 'test-unit' to the gemspec file seems to resolve the error and I'm back on track with the tutorial.

Is it bundler that's not adding the 'test-unit' library on a new project build? If so, is there a way to fix this. I have added a note-to-self to fix the gemspec file on new projects but it would be great if methadone handled it initially. Feature request?

Thanks again for this library.

davetron5000 commented 9 years ago

Are you on Ruby 2.2 by any chance? I think test/unit no longer exists and I might have to figure out how to set that up in a version-agnostic way

lebogan commented 9 years ago

ruby 2.2.2p86 (2015-03-03 revision 49825) [x86_64-linux]. I found out that test/unit is replaced by minitest but test/unit is still kept for legacy apps.

On Mon, 2015-05-25 at 07:32 -0700, David Copeland wrote:

Are you on Ruby 2.2 by any chance? I think test/unit no longer exists and I might have to figure out how to set that up in a version-agnostic way

— Reply to this email directly or view it on GitHub.

davetron5000 commented 9 years ago

I think I have a fix for this. It's building on Travis CI right now, but if you want to try it locally, you can:

  1. Add this to your fullstop app's Gemfile:

    gem "methadone", github: "davetron5000/methadone", branch: "fix-test-unit-issue-for-2.2"
  2. Then, install this branched version via bundle install
  3. Then try bundle exec rake

The change there does a few things:

davetron5000 commented 9 years ago

Should be fixed in 1.9.1. Re-open if not.