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


Phil Austin
HOME ยป 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 /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>

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”
by Phil Austin in 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
The “:w ! ruby” vim command is failed to run the ruby script with “require_relative”
by Marc Dong in 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>'
TAGS: ldquo ruby rdquo command failed ruby
Ruby Gems returns “command not found”
by Dittmar in 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


RUBY ON RAILS - “msvcrt-ruby18.dll was not found” with Ruby
by john3850 in 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


linux like behavior in windows shell - running ruby without “ruby” appended to the command?
by KCro in 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


Ruby on Rails and Ubuntu: typing just “script/generate …” instead of “ruby script/generate”
by David Marchant in 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
TAGS: Ruby Rails Ubuntu typing just ldquo
“ruby script.rb” versus “xterm -e ruby script.rb”
by Venezuela in 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'<
On Ruby on Rails, where is “commands/server” which is required by script/server?
by Soccer55 in 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
rails-installer.sh runs fine but ruby, irb, rails command “not found” (UB12.04)
by HoagieMon in 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


When you run “rails server” how do you get the ruby version to match what you see with “ruby -v”?
by zokudu in 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


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2014 © bighow.org All Rights Reserved .