I get uninitialized constant Teston startup rails consolein the terminal. I'm not sure why I just installed it, and using the command rails serverworks.
uninitialized constant Test
rails console
rails server
This is the error I get:
/usr/lib/ruby/vendor_ruby/active_support/test_case.rb:12:in `<module:ActiveSupport>': uninitialized constant Test (NameError)
I ran into this problem on my Ubuntu 14.04 desktop. It is solved as follows:
sudo apt-get install ruby-test-unit echo require 'test/unit' >> /usr/lib/ruby/vendor_ruby/active_support/test_case.rb
see this link: https://bugs.launchpad.net/ubuntu/+source/ruby-activesupport-3.2/+bug/1319101
. .
RSpec :
Shoulda::Matchers.configure do |config| config.integrate do |with| # Choose a test framework: with.test_framework :rspec # with.test_framework :minitest # with.test_framework :minitest_4 # with.test_framework :test_unit # Choose one or more libraries: with.library :active_record with.library :active_model with.library :action_controller # Or, choose the following (which implies all of the above): with.library :rails end end
echo Ubuntu 14.04. sudo vi test_case.rb "/" .
-: rvm rbenv? !
Secondly: it does not find a reference to a class named Test. Are you sure this name is? You demanded it right? What test structure are you using?
Source: https://habr.com/ru/post/1543107/More articles:How to access Objective-C and Swift classes from one storyboard? - iosPanoramic seam with Android camera source code - androidFaster LIKE '% XXX' - mysqlHow to set appropriate line width for drawing text in Python PIL? - pythonBoth key columns and PK key key - javaHow to create JavaScript Hello World in a Mule component - muleset the maximum date for choosing the client-side kendo date - javascriptC ++ - an effective way to compare vectors - c ++Customize the color of the stroke of the title text in the UINavigationBar - iosПользовательский перегруженный оператор * с std:: chrono:: duration - c++All Articles