It is little weird now that cron job is not working as i have set. I have set weekly job to send email but i am receiving multiple emails daily. Below is my code; # sends email every monday at 4:00 am 00 04 * * 1 /usr/bin/ruby /home/mbm/www/current/script/runner /home/mbm/www/current/app/models/add_to_delayed_job.rb -e production
00 -> Minutes
04 -> Hours (0-24)
1 -> Days / 0-6 / Sun - Sat
Sending email is fine but the time is not working so far as set.
I'm going through the Beta version of "Agile Web Development with Rails - 4th Edition". But I'm having difficulty with initial configuration on my Gentoo box. I started like so, basically following the book:
Code: $ rails testrails $ cd testrails $ script/generate controller Say hello goodbye
The site that used to host the language spec file for .erb/.rhtml for ruby/rails syntax highlighting is no more.If someone could attach the file for gtksourceview-2.It's located in /usr/share/gtksourceview-2.0/ language-specs/ and probably called rhtml.lang
I'm trying to install ruby on rails on Ubuntu 9.10. I'm following the instructions on this site: http://castilho.biz/blog/2009/11/05/...-karmic-koala/
However, when I try to install Rails I get an error code...
It seems like gem can't access http://gems.rubyforge.org/gems/rake-0.8.7.gem for some reason, but when I try to go directly to that address I get the option to download it. Any ideas how to get around this problem?
I'm thinking if I can somehow tell gem to look for the file locally I can download it and install rails that way.
I'm the noobiest noob you'll find on here. I'm having trouble getting ruby on rails to work with mysql on redhat. So on their forum I asked how to install the latest "sqlite" database package on linux.They told me to run.Now, I don't think I need "sudo" because I am the root user on my database, and I don't think I can use "apt-get" because I'm using redhat, not ubuntu.
1) Is there a way of running the above command on redhat? (A redhat command for installing things?)
2) How can I be sure I'm using redhat and not some other OS?
I've been using rubyripper quite happily on Karmic, now I've moved to Lucid and discovered a bit of an issue. rubyripper will pause for several minutes between tracks with ruby 1.8. If I upgrade to ruby 1.9.1 the gui client won't run due to an issue with libgtk2-ruby not being available for 1.9.1.
The cli version of rubyripper under 1.9.1 is blazingly fast, so that is what I'm using at the moment, but I do prefer the gui.
Anyone have any insight into this? Googling suggests there may be a bug in ruby 1.8.7 that caused the long pauses, but it was supposed to have been fixed in 1.8.7.249 i.e. the default Lucid version.
There are a few things not working properly. Ruby version manager seems ok but untill i get working with ruby i don't know if it is working properly. One thing that is not there is irb Interactive ruby is not available according the the message i get.
Well i have no idea what readline is but i did everything that is on that webpage referance page [url]. I have got a lot of progress and learned heaps about linux shell and bash terminal. The thing is i need to get this going and have tried feenode but it is very foreign and how it works i do not have a clue. I have got 2 things resolved so far through this forum but using other threads in it. i need to get irb going before i can progress to using ruby on Rails properly.
I am using a Eeepc running ubuntu easy peasy its version 9.04 of ubuntu. I need the whole of rails to work and want to get a handle on using ruby version manager along with the apache stack with mysql/phpmyadmin and am using this as a dummy run for setting up a development system.
Maybe it's just the program i downloaded and maybe something's missing, but when I run ./configure I get the error: ./configure: line 4: ruby: command not found it told me to try cnf configure and it says no such file Is this me, suse or the program I downloaded? Something's wrong here.. Maybe ruby needs installed?
I run a Fedora 9 server at home, to host an "old school" MOO.To back up the database, I scheduled a cron job - and got some help with the script.I don't fiddle with stuff on the server much, because I don't really have a clue - leave well enough alone.But now I'm without backups. (I'd prefer to get this working, as it seemed pretty simple, and worked well for so long).
I make a script to automate burning backup files on dvd. It works fine if I start it from root user, but if I start it. From cronjob do noting. I try on growisofs the option -use-the-force-luke=force but nothing happens. I check the env of cron:
HOME=/root LOGNAME=root PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PWD=/root SHELL=/bin/bash SHLVL=1 XDG_SESSION_COOKIE=3e0d70f7b71074a0b1fff4bb4aa97d13-1281297181.926502-724038309 _=/usr/bin/env and it seems ok i've got my script in /usr/local/bin and growisofs in /usr/bin
Code of my script below: #!/bin/bash bkup_path='/bkrepo/'; prefix='PAR*'; totdimfile=0 for FILE in $(/bin/ls -r $bkup_path$prefix)
do dimfile=`/bin/ls -l $FILE | /usr/bin/awk -F " " '{print $5}' ` let "totdimfile += dimfile"; if [ "$totdimfile" -lt "4700000000" ] then NAMEFILE=`/bin/ls -l $FILE | /usr/bin/awk -F " " '{print $8}' ` ALLNAMEFILE="$ALLNAMEFILE $NAMEFILE"; fi done
/usr/bin/growisofs -use-the-force-luke=force -Z /dev/scd0 -R -J $ALLNAMEFILE /usr/bin/growisofs -M /dev/scd0=/dev/zero /usr/bin/eject end code of my script
How to schedule a job using cron that shouldn't run between working hrs 9am-5pm, while run in non working hrs every hour, every day of the month, month & week.I tried the following way, not sure I can use logical not operator(!).
Got a small problem, I'm trying to schedule a script to run every Thursday at midday and the scheduled tasks application on Ubuntu doesn't seem to work. The script is fine when I run it from a terminal.I have zero experience using cron at the command line, can anyone tell me what I should do?
I am new to Linux and have done an install of Moodle 1.9.8 on Linux OpenSuse 11.0
I have created my cron via the terminal (crontab -e) root crontab - see below:
When going to /var/log/messages my cron entries appear as they should but my backup does not run and every morning when I go to the Notifications tab it tells me my crom maintenance script has not run in 24hours.
I would also like to get this in a log file and emailed to me.
The back.sh script is being run as user basil, whcih means that when it comes to copying the backup file to the target location you do not have the correct permissions to access the contents of the directory (it is rwx by root only).So, what do we do? Hoping it is ONLY the directory permissions which are fouling things up we have a range of options which, in not particular order of 'good', include:
a) change ownership/permission on target directory. b) have the back.sh script run by the root user c) set up sudo to permit the file copy to be done by root d) use setuid on the back.sh to have it run, effectively, as root
A lot of the answer will depend upon what else the Dropbox directory is for. If it's JUST for your backups for this then I'd be inclined to:
which will permit the basil user full access and thus allow the file operations being done and give root access via the group permissions (not that the root user really needs this).Also, I'd be inclined to:
I am trying to install rails 3.0.1 on ubuntu 10.10. I am getting this error towards the end when i execute this command sudo gem install rails --version 3.0.1.
I have two servers. One of them has a svn server running and another hosting projects.
I have a daily cronjob updating the projects -- ie running svn update, rebuild etc.
Now, my cronjob on the remote server works. However, a similar cronjob running on the local server for local projects (ie the same server as svn) is instead displaying a "svn: not working copy".
I double checked the paths, permissions and user info and if the script is launched manually, it works fine. Deploying the same thing remotely works.
I even tried using file:/// (suggested here http://www.hightekhosting.com.au/myaccount/knowledgebase/90/Using-SubversionorSVN-on-cPanel-Servers.html) but still nothing.
(Using Archlinux) I downloaded Ruby 1.8.7-174 a while ago and installed it via the tarball (not pacman). I was trying to update to 1.8.7-299, but I can't get it to work. Per the readme, I do the following steps, all of which complete without error:
./configure make make install
After install finishes however, I still have -174 installed instead of -299.
Trying to understand my ruby folder structure? Why my gems are scattered all over and why they aren't recognised commands. I'll explain how my installation looks like first: /usr/bin/ruby /usr/bin/ruby1.8 /usr/bin/ruby1.9.1
The first is a soft link to ruby1.9.1 because the "ruby" command didn't work in the terminal. I did the same with "gem". I installed rubygems through downloading, extracting and then running setup.rb here: (I created the "ruby" folder) /home/pc/ruby/rubygems-1.7.2/setup.rb /usr/bin/gem /usr/bin/gem1.8 /usr/bin/gem1.9.1
I installed a few gems with "sudo gem install" > gem list *** LOCAL GEMS *** compass (0.10.6) haml (3.0.25) mustache (0.99.3) rake (0.8.7)
So far so good? Well not quite, as it turns out the command "compass version" doesn't seem to exist. My confusion grows with each folder I look into. The following path doesn't make any sense to me, for example. Why would it be hidden? Why is mustache the only gem inside this folder? /home/pc/.gem/ruby/1.9.1/cache/mustache-0.99.3.gem
First of all, here is "gem environment", which makes even less sense, because I have definately installed rubygems-1.7.2 like I told you in the first paragraph, but here it shows an ancient version 1.3.7. Why? I installed Ubuntu the day before yesterday. RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.9.1 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 - EXECUTABLE DIRECTORY: /var/lib/gems/1.9.1/bin - RUBYGEMS PLATFORMS: ..... Ruby --version returns "ruby 1.8.7"...........
Also, as it turns out, all gems are installed into this folder (mustache too! even though it already is inside the other folder), just as "ruby environment" claims: /var/lib/gems/1.9.1/gems. But none of these gems work. I can't call any of these, except rake. So here is where I probably made the mistake, I think I used "apt-get install rake" in addition to "gem install rake", because the command "rake" wasn't recognised, and the command prompt suggested it. I may have done so with rubygems too... I'm new to Linux, and I figured that the command prompt knew how to install this stuff properly. It can't be normal that I have to create syslinks all over, right? In Windows I didn't run into this problem.
I am using Red Hat Enterprise Version 5. There is a ruby program which use standard input as its input (e.g. the Ruby program process input from standard input). I think standard input should be keyboard, correct?
So, I think other kinds of input (non-standard input) should not work (i.e. the ruby program should not be able to read input from such non-standard input), but actually I have tried using pipe works, I am so confused because I think pipe should be some other kinds of input -- other than standard input, why it could work? i.e. put text "123" in abc.txt with pipe, could achieve the same result as using keyboard as input to type "123" for the ruby program.
I have a cron job to run every 15 minutes. The cron job is running per /var/log/cron. It lists the job every 15 minutes.
[Code]...
I do not see any errors. I also looked in /var/log/messages for any errors and it does not list any. I added a line to the script that is running to send an email to me to see if it is running or not. When I run the script from the command line, the script runs without error and I get an email. I have searched and can not find what it going on. Is there some where else errors might be? Could there be a permission issue? The cron job is not being added by the root user.