Cannot load rspec/core/rake_task

I’m working on a Ruby gem. The “rake” command works as expected in my Mac setup, but when I enter the “rake command” on my Linux setup in VirtualBox 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 in VirtualBox, but I know that there is a critical detail that I’m missing in 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.