Cannot load rspec/core/rake_task

I’m working on a Ruby gem. The “rake” command works as expected in my
setup, but when I enter the “rake command” on my Linux setup in
with a FRESH Ruby on Rails setup, I get the following error message:
rake aborted!
cannot load such file – rspec/core/rake_task
/home/jhsu/lottosim/Rakefile:2:in `<top (required)>’
(See full trace by running task with --trace)

I tried using the .ruby-version file to specify Ruby 2.0.0, but that
doesn’t solve the problem.

I know that most people don’t keep a fresh installation of Ruby on Rails
VirtualBox, but I know that there is a critical detail that I’m missing
the gemspec or elsewhere in my project.

I solved the problem by taking out the version number specifications of
bundler and rake (development dependencies) in the gemspec. These
constraints (created by default when I ran the initial command to create
the gem directory structure) caused conflicts.