Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add minitest to the Gemfile template #7319

Closed
wants to merge 1 commit into from

5 participants

@robin850
Collaborator

Hello,

I don't think it's an issue on my computer but if it is, sorry for this pull request. When I want to start the console typing rails c, I have a LoadError like this one:

/home/robin/.gem/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- minitest/unit (LoadError)

So I think we can add minitest by default in the Gemfile ?

Have a nice day.

@jeroeningen

IMHO it's a little 'overkill' to add it by default. A lot of developers use another test framework and some developers even don't use any framework at all. In these cases your modification of the Gemfile is just unneeded 'weight'.

But maybe it is an idea that you can specify the framework you want to use when initializing a new rails app. I guess currenty this option is not available.

@robin850
Collaborator

Hi,

I agree with you but even if we use another test framework such as rspec, the rails console doesn't boot. We have the same error. Maybe comment the line in the Gemfile like for debugger or capistrano ?

@jeroeningen

I think to comment it out like capistrano is better then the way you do it now ;)

@robin850 robin850 Add minitest to the Gemfile template
When we want to start the rails console we have a LoadError cannot load such file -- minitest/unit
e306ec8
@steveklabnik
Collaborator

I also feel adding it is overkill. Minitest comes with Ruby 1.9, so you shouldn't really need to use the gem.

I'm actually really confused as to how you got that error in the first place.

@rafaelfranca

Thank you for the pull request.

I agree with @steveklabnik @jeroeningen, since master will only support ruby 1.9.3+ and minitests ships with this version you don't need to use the gem.

@robin850
Collaborator

I use Ruby 1.9.3p194 and when I run rails console, I have the error present in the first post. Sorry, I didn't know miitest is only present for 1.9+. Have a nice day !

@rafaelfranca

@robin850 minitest should be present in 1.9.3p194 too.

irb
>> p RUBY_VERSION
"1.9.3"
=> "1.9.3"
>> require 'minitest/unit'
=> true
@robin850
Collaborator

Oh, so I think it's an issue on my machine. Than you and sorry for the disturbing! :)

@voxik

Actually this is Fedora + Rails issue. Please see #6907 for reference

@robin850
Collaborator

@voxik : Thanks!

@axilleas axilleas referenced this pull request in gitlabhq/gitlabhq
Closed

For running tests i have to edit Gemfile #3826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 10, 2012
  1. @robin850

    Add minitest to the Gemfile template

    robin850 authored
    When we want to start the rails console we have a LoadError cannot load such file -- minitest/unit
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  railties/lib/rails/generators/rails/app/templates/Gemfile
View
2  railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -9,6 +9,8 @@ source 'https://rubygems.org'
<%= assets_gemfile_entry %>
<%= javascript_gemfile_entry %>
+# gem 'minitest'
+
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Something went wrong with that request. Please try again.