

- #Docker run image no such file or directory install
- #Docker run image no such file or directory update
However, it is troublesome to start cron manually every time, so if possible, I would like to describe it in the docker file so that it will be started automatically. You can see that the data has been generated! Task Loading development environment (Rails 5.2.4.3) Running via Spring preloader in process 135 Running via Spring preloader in process 122įinally cron.log was generated and the log was written.Ĭheck with rails console. Starting periodic command scheduler: cron. Start cronĬheck the status because cron is not running. If whenever is working, clog / cron.log should be created. I think that the automatic processing has started, so I will wait for a while. It was successfully updated and reflected in cron. :/myapp# bundle exec whenever -update-crontab
#Docker run image no such file or directory install
RUN apt-get install -y cron #Add this line
#Docker run image no such file or directory update
RUN apt-get update -qq & apt-get install -y build-essential libpq-dev nodejs

Install cronĪpparently, I have to install cron in the docker environment, so describe the processing required for installation in the docker file. usr/local/bundle/bin/whenever:23:in `load'Īs a cron beginner, I stumbled here.

usr/local/bundle/gems/whenever-1.0.0/lib/whenever/command_line.rb:6:in `execute' usr/local/bundle/gems/whenever-1.0.0/lib/whenever/command_line.rb:38:in `run' usr/local/bundle/gems/whenever-1.0.0/lib/whenever/command_line.rb:77:in `write_crontab' usr/local/bundle/gems/whenever-1.0.0/lib/whenever/command_line.rb:77:in `popen' When you reach this point, reflect the settings in cron :/myapp# bundle exec whenever -update-crontabīundler: failed to load command: whenever (/usr/local/bundle/bin/whenever)Įrrno::ENOENT: No such file or directory - crontab Require File.expand_path(File.dirname(_FILE_) + "/environment") Stack Exchange network consists of 179 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. A few weeks ago I got this error running a Docker environment on Windows 10. :/myapp# bundle exec rails g controller postsĪfter rebuilding and installing the gem, execute the command to create the file :/myapp# bundle exec wheneverize. On docker :/myapp# bundle exec rails g model post name:string Start as if the docker environment construction has been completed. This time, prepare a model called post and use whenever to create a post every minute. When creating an application with docker, I tried to process using whenever, but I stumbled, so I will write it as a memorandum. Convenient gem "whenever" that allows you to easily write scheduled processing
