# Rake aborted! cannot load such file -- /var/www/redmine/Rakefile

**URL:** <https://www.ruby-forum.com/t/rake-aborted-cannot-load-such-file-var-www-redmine-rakefile/245610>\
**Category:** Deployment\
**Created:** [June 20, 2013, 5:22pm UTC](https://www.ruby-forum.com/t/rake-aborted-cannot-load-such-file-var-www-redmine-rakefile/245610 "2013-06-20T17:22:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [June 20, 2013, 5:22pm UTC](https://www.ruby-forum.com/t/rake-aborted-cannot-load-such-file-var-www-redmine-rakefile/245610/1 "2013-06-20T17:22:04Z")

</div>

Dear all,

I have installed a redmine server, all is running except when I try to  
run this task with cron.

The rakefile is in the path and it works when i run the command manually  
in the terminal.

redmine:email:imap

here are my configuration details  
Environment:  
Redmine version 2.3.1.stable  
Ruby version 1.9.3 (i486-linux)  
Rails version 3.2.13  
Environment production  
Database adapter Mysql2  
Redmine plugins:  
no plugin installed

when I run whereis rake, i have the following output  
/usr/local/bin/rake

and this is my cron task that I set via my user - crontab -e

cd /var/www/redmine/ && /usr/local/bin/rake redmine:email:receive\_imap  
RAILS\_ENV=“production” host=mail._ **.ch username=support2@** _\*\*\*\*  
password=\*\*\*\* port=143 project=support allow\_override=project  
unknown\_user=accept --trace

I have also tried this one  
cd /var/www/redmine/ && /usr/local/bin/rake -f  
redmine:email:receive\_imap RAILS\_ENV=“production” host=mail._**.ch  
username=support2@**_\*\*\*\* password=\*\*\*\* port=143 project=support  
allow\_override=project unknown\_user=accept --trace

here is the email that sent the cron daemon

From: root@redmine (Cron Daemon)  
To: redmine@redmine  
Subject: Cron [redmine@REDMINE](mailto:redmine@REDMINE) cd /var/www/redmine/ &&  
/usr/local/bin/rake redmine:email:receive\_imap RAILS\_ENV=“production”  
host=mail._ **.ch username=support2@**.org password=_\*\* port=143  
project=winmedia-support allow\_override=project unknown\_user=accept  
–trace  
Content-Type: text/plain; charset=UTF-8  
X-Cron-Env: \<SHELL=/bin/sh\>  
X-Cron-Env: \<HOME=/home/redmine\>  
X-Cron-Env: \<PATH=/usr/bin:/bin\>  
X-Cron-Env: \<LOGNAME=redmine\>  
Message-Id: [E1UpFI6-0005pj-9x@REDMINE](mailto:E1UpFI6-0005pj-9x@REDMINE)  
Date: Wed, 19 Jun 2013 12:07:02 +0200

rake aborted!  
cannot load such file – /var/www/redmine/Rakefile  
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake\_module.rb:25:in  
`load' /var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load\_rakefile’  
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in  
`raw_load_rakefile' /var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load\_rakefile’  
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in  
`standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load\_rakefile’  
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in  
`block in run' /var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard\_exception\_handling’  
/var/lib/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' /var/lib/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `\<top (required)\>’  
/usr/local/bin/rake:23:in `load' /usr/local/bin/rake:23:in `’

here is my bundle list if it can help

\*\*\* LOCAL GEMS \*\*\*

actionmailer (3.2.13)  
actionpack (3.2.13)  
activemodel (3.2.13)  
activerecord (3.2.13)  
activeresource (3.2.13)  
activesupport (3.2.13)  
arel (3.0.2)  
builder (3.0.4, 3.0.0)  
bundler (1.3.5)  
capybara (2.0.3)  
childprocess (0.3.9)  
coderay (1.0.9)  
daemon\_controller (1.1.4)  
erubis (2.7.0)  
ffi (1.9.0)  
hike (1.2.3)  
i18n (0.6.1)  
journey (1.0.4)  
jquery-rails (2.0.3)  
json (1.8.0)  
mail (2.5.4)  
metaclass (0.0.1)  
mime-types (1.23)  
mini\_portile (0.5.0)  
mocha (0.13.3)  
multi\_json (1.7.6)  
mysql2 (0.3.11)  
net-ldap (0.3.1)  
nokogiri (1.6.0)  
passenger (4.0.5)  
polyglot (0.3.3)  
rack (1.4.5)  
rack-cache (1.2)  
rack-openid (1.3.1)  
rack-ssl (1.3.3)  
rack-test (0.6.2)  
rails (3.2.13)  
railties (3.2.13)  
rake (10.0.4)  
rdoc (4.0.1, 3.12.2)  
rmagick (2.13.2)  
ruby-openid (2.1.8)  
rubyzip (0.9.9)  
selenium-webdriver (2.33.0)  
shoulda (3.3.2)  
shoulda-context (1.0.2)  
shoulda-matchers (1.4.1)  
sprockets (2.2.2)  
thor (0.18.1)  
tilt (1.4.1)  
treetop (1.4.14)  
tzinfo (0.3.37)  
websocket (1.0.7)  
xpath (1.0.0)  
yard (0.8.6.1)

do you have any idea or logs that I can check?

Thanks for your time and your help I really would like to make it work.

---

<div class="post-metadata">

**Author:** ![jrme\_r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@jrme\_r](https://www.ruby-forum.com/u/jrme_r)\
**Post date:** [July 18, 2014, 2:40pm UTC](https://www.ruby-forum.com/t/rake-aborted-cannot-load-such-file-var-www-redmine-rakefile/245610/2 "2014-07-18T14:40:07Z")

</div>

Try running these cron with bundle exec
