Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9231687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:08:00+00:00 2026-06-18T06:08:00+00:00

When running ‘heroku run rake’ I get this error: no such file to load

  • 0

When running ‘heroku run rake’ I get this error:

  no such file to load -- faker
/app/lib/tasks/sample_data.rake:1:in `require'
/app/lib/tasks/sample_data.rake:1:in `<top (required)>'

I have gem ‘faker’, ‘0.3.1’ under group :development, :test do in Gemfile.

I have require ‘faker’ in sample_data.rake

source 'https://rubygems.org'

gem 'rails', '3.2.11'
gem 'gravatar_image_tag', '0.1.0'

group :development, :test do
  gem 'sqlite3', '1.3.5'
  gem 'rspec-rails', '2.8'
 gem 'guard-spork', '1.2.0'
 gem 'faker', '0.3.1'
  gem 'spork', '0.8.4'
  gem 'will_paginate', '3.0'
gem 'webrat', '0.7.1'
 gem 'capybara', '1.1.2'
gem 'annotate', '2.5.0'
gem 'factory_girl_rails', '1.0'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.2'

group :production do
  gem 'pg', '0.12.2'
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:08:01+00:00Added an answer on June 18, 2026 at 6:08 am

    Heroku does not install test or development gems by default.

    If you want to load fake in your production, you should remove gem 'faker', '0.3.1' from the group :development, :test do and place it outside any group:

      source 'https://rubygems.org'
      gem 'rails', '3.2.11'
      gem 'gravatar_image_tag', '0.1.0'
      gem 'faker', '0.3.1'
    
      group :development, :test do
      gem 'sqlite3', '1.3.5'
      ...
    

    However, if you don’t want to load fake, you must ensure that your require fake will be required only when the task is invoked:

    task :sample_data => :environment do
      require 'faker'  #must be inside the task.
      ...
    end
    

    Hope it helps.

    EDIT

    You can tell Bundler to not load the Gem by:

     gem 'faker', '0.3.1', :require => false
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running this: bcp MyDb.dbo.uvwMyView out c:\Test.txt -SMyServer -T -c I get this error: SQLState
Running in Debug and pressing F8 to continue will get this 'Class File Editor
Running the code bellow, I'm getting this error: Traceback (most recent call last): File
Running this Express app locally works . Running it on Heroku gives the pasted
Running Bison on this file: %{ #include <iostream> int yylex(); void yyerror(const char*); %}
Running this command in the mongodb installation file from mongodb.org ./mongo ds045907.mongolab.com:45907/database -u user
Running this code creates file2.txt as expected, but the file is empty. (Note: file1.txt
Running one application I receive such error: C:\Program Files\P2CGate\sdk\samples\net\basic>nsend.exe Unhandled Exception: System.IO.FileNotFoundException: Could not
Running this xul app: <?xml version=1.0?> <?xml-stylesheet href=chrome://global/skin/ type=text/css?> <window width=400 height=300 style=background-color:transparent; xmlns=http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul>
Running into a problem where on certain servers we get an error that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.