Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialThomas Bergman
1,320 PointsMy initial "rake spec" fails
Hi all,
When I run the initial "bin/rake spec" command (~1 min in the video), I get a LoadError. See the console output here:
It seems that a file is missing when active_support is trying to load the dependencies. Can anyone help me figure out what's wrong? Thanks, much appreciated!
My setup is: Ruby 2.2.0 Rails 4.2.0 rspec 2.14.8
3 Answers
Michael Liquori
8,131 PointsHere is what worked for me:
- Open
db
folder - delete
test.sqlite3
- duplicate
development.sqlite3
and rename ittest.sqlite3
Source: StackOverflow
I did not need to use the older version as mentioned in my comment above (using bundler etc. just as the videos say.)
Maciej Czuchnowski
36,441 PointsTry simply running rake spec
without the bin/, then try rspec
or bundle exec rspec
if this didn't help. I also recently had some problems with gems under Ruby 2.2.0, so you can later try using some older version of ruby to see if that's the cause (for example rvm install 2.1.5
, rvm use 2.1.5
, bundle install
and then rake spec
or rspec
or bundle exec rspec
).
markd2
5,253 PointsI had this issue on my Mac.
Follow the instruction at https://github.com/rspec/rspec-rails.
It updates for newer versions of Rails. I think it was requiring a newer version of Rails (~> 3.0) in the Gemfile.
Also I had to install rspec via: gem install rspec followed by: rspec --init.
Michael Liquori
8,131 PointsMichael Liquori
8,131 PointsI have the same problem. Are you on Windows? (I am)
According to this link,
However, that does not fix it for me automatically, perhaps because i've already installed following the videos. So, I am lost. Any help?