Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Too many warnings about 'circular require' when run rspec

Hi I got lots of warning when run rspec which does annoying me too much,

How to fix it ? because I've tried the Ruby version 2.1.2 under rbenv, but it didn't work at all.

Here's my Gemfile

source 'https://rubygems.org'  gem 'bootstrap-sass' gem 'coffee-rails' gem 'rails' gem 'haml-rails' gem 'sass-rails' gem 'uglifier' gem 'jquery-rails'  group :development do   gem 'sqlite3'   gem 'pry'   gem 'pry-nav'   gem 'thin'   gem "better_errors"   gem "binding_of_caller" end  group :test, :development do     gem 'rspec-rails' end  group :production do   gem 'pg'   gem 'rails_12factor' end gem 'hirb' gem 'crack' gem 'ap' gem 'awesome_print'  # gem 'faker' 

Warning meassages

% rspec                                                                                                                                             (git)-[feature/w1_test_the_video_model]  nil /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/bootstrap-sass-3.1.1.1/lib/bootstrap-sass/sass_functions.rb:20: warning: ambiguous first argument; put parentheses or even spaces /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/sass-3.2.19/lib/sass/version.rb:5: warning: loading in progress, circular require considered harmful - /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/sass-3.2.19/lib/sass.rb     from /Users/jeff/.rbenv/versions/2.0.0-p481/bin/rspec:23:in `<main>'     from /Users/jeff/.rbenv/versions/2.0.0-p481/bin/rspec:23:in `load'     from /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/exe/rspec:4:in `<top (required)>'     from /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec/core/runner.rb:38:in `invoke'     from /Users/jeff/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/rspec-core-3.0.0/lib/rspec... 
like image 361
user3675188 Avatar asked Jun 06 '14 01:06

user3675188


1 Answers

I had same error and fixed it refs the page.

Guard with RSpec on Rails 4 giving a lot of warnings

the --warnings option in the .rspec file by default. Remove that line, and the warnings will go away.

like image 100
isseium Avatar answered Oct 05 '22 23:10

isseium