How do I run ruby commands in my bash script without getting “ruby: command not found”



my script=


#!/bin/bash
echo ************************BEGIN LOG******************************>>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
date +"%m/%d/%Y %H:%M:%S $HOSTNAME">>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
ruby /root/backup_scripts/new_scripts/aapxen01.rb>>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
ruby /root/backup_scripts/new_scripts/apvdbs03.rb>>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
ruby /root/backup_scripts/new_scripts/aapxen02.rb>>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
echo end log entry>

View Replies

Related to : How do I run ruby commands in my bash script without getting “ruby: command not found”


How do I run ruby commands in my bash script without getting “ruby: command not found”
Category : Programming Languages

my script=


#!/bin/bash
echo ************************BEGIN LOG******************************>>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
date +"%m/%d/%Y %H:%M:%S $HOSTNAME">>/root/backup_scripts/new_scripts/vmbackup.log 2>&1
ruby /roo

View Replies


The “:w ! ruby” vim command is failed to run the ruby script with “require_relative”
Category : Programming Languages

Here is my ruby script:


require_relative 'lib/say.rb'
say("hello")

I run it from macvim via :w ! ruby and got:


:w ! ruby
-:1:in `require_relative': cannot infer basepath (LoadError)
from -:1:in `<main>'

View Replies


RUBY ON RAILS - “msvcrt-ruby18.dll was not found” with Ruby
Category : Programming Languages

i am using:
windows 7
rails 3.0


whenever i try to run rake db:migrate. i get the following error in popup...


This application has failed to start because msvcrt-ruby18.dll was not found. Re-installing the application may fix the problem.


need help her


View Replies


Ruby Gems returns “command not found”
Category : Programming Languages

Ubuntu 9.10


Just installed newgem


gem install newgem

and when i try


newgem new_project

I get


adam@adam-ubuntu:~$ newgem newproject
newgem: command not found

Ive checked m


View Replies


linux like behavior in windows shell - running ruby without “ruby” appended to the command?
Category : Programming Languages

This is probably a really silly question bu tI can't seem to find an answer since I'm apparently failing on keywords.


You know how you can run commands from the commandline in linux if you put a line on the top of your .rb file so you don't have to type ruby myfile.rb all


View Replies


Ruby on Rails and Ubuntu: typing just “script/generate …” instead of “ruby script/generate”
Category : Programming Languages

I'm using Ubuntu 10.04. In the terminal, when I go to my app and type (without using the "ruby" in front):


script/generate controller recipes

I get a "Permission denied" error. When I use this however:


ruby script/generate controller recipes

View Replies


“ruby script.rb” versus “xterm -e ruby script.rb”
Category : Programming Languages

I've run into a strange problem with Ruby that I can't explain. I have the following script that grabs whatever code is currently in the clipboard, runs it through a syntax highlighter, then puts the new version BACK into the clipboard:


#!/usr/bin/ruby1.9.1
require 'coderay'<

View Replies


On Ruby on Rails, where is “commands/server” which is required by script/server?
Category : Programming Languages

Rails's script/server is just a few lines:


#!/usr/bin/env ruby
require File.expand_path('../../config/boot', __FILE__)
require 'commands/server'

I wonder where the server file is? I tried a


find . -name 'ser

View Replies


rails-installer.sh runs fine but ruby, irb, rails command “not found” (UB12.04)
Category : Programming Languages

I ran rails-installer.sh on ubuntu 12.04. The scripts reports that ruby and gems and rails all installed without problem.


However, when I try:


ruby -v
rails -v
etc.

They all report "command not found".


I am new to linux... what


View Replies


When you run “rails server” how do you get the ruby version to match what you see with “ruby -v”?
Category : Programming Languages

I can't seem to get my version of ruby when running "rails server" to be the same as the one in terminal. If I run commands like ruby -v I get 1.9.3 which is the version that I want to use. But I get 1.8.7 when I use rails server. Any idea how I get get my local serve


View Replies


2012 / 2017 Copyrights BigHow , All Rights Reserved .