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 9228763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:24:21+00:00 2026-06-18T05:24:21+00:00

Using lubuntu 12.10, ruby 1.9.3p374(not RVM), Gem 1.8.23, and Rails 3.2.11 I’ve just recently

  • 0

Using lubuntu 12.10, ruby 1.9.3p374(not RVM), Gem 1.8.23, and Rails 3.2.11

I’ve just recently installed the Whenever gem to create tasks that will run periodically. I created my task which runs every 1 minute and set it to run using:

whenever --update-crontab myproject --set environment=development

This command puts the following entry in my crontab:

* * * * * /bin/bash -l -c 'cd /home/myuser/projects/myproject && script/rails runner -e development '\''FileImporter.execute'\'' >> /home/myuser/projects/myproject/log/cron_log.log 2>&1'

After waiting for some time I see that in my cron_log.log file spammed with the same exception:

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in 'require: cannot load such file -- bundler/script (LoadError)

However, when I run the following command manually in the terminal everything works just fine:

/bin/bash -l -c 'cd /home/myuser/projects/myproject && script/rails runner -e development '\''FileImporter.execute'\'' >> /home/myuser/projects/myproject/log/cron_log.log 2>&1'

Let me know if any more information is needed, I’m pretty new to the rails/linux world so I may have left some important stuff out.

  • 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-18T05:24:22+00:00Added an answer on June 18, 2026 at 5:24 am

    Found the answer here on a similar question: why #!/usr/bin/env ruby doesn't work in crontab?

    Apparently PATH isn’t set when the cron job executing so you have to set it in the crontab.

    Running echo $PATH to see what PATH is set to and putting PATH=/my/path/values at the beginning of the crontab file fixes the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using getDefinitionByName I am consistently getting the error saying it is not defined (as
(using jquery or just js) Is it possible to add script to an iframe
Using Tsql, how can I find out when MS SQL server was installed?
Libnotify was working fine on my system (Lubuntu) until I started using guard-spork. My
Using CSS, how can I create a partial border as per image below I
using phpPgAdmin, I've tried to create a table in my database. But am getting
Using Rails 3, but I guess doesn't matter. I put this in the template
Using intents to communicate between two activities seems not straightforward. Regardless of where (probably
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
Using a populated Table Type as the source for a TSQL-Merge. I want to

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.