I'm on OSX 10.8 and i'm trying to execute a script from my home directory, ~.
The script is to shorten the creation of a new rails app, e.g:
ruby new path/to/app
This is the alias in my ~/.profile:
alias rc="~/.rubynew
And the contents of .rubynew, which have been run through chmod 755 ~/.rubynew are:
#!/bin/bash
$path="~/Documents/Rails_Apps/"
ruby new $path+=$1
Further Information
Executed as:
rc helloworld
Should create an application with the path:
~/Documents/Rails_Apps/hellworld
I'm getting errors for these, which I use to compile c with gcc, in exactly the same method. I have Googled this for a good one hour and rewritten in 50 different ways and it refuses to work, any guesses?
~/Documents/Rails_Apps does exist.
Errors:
/Users/tsujp/.rubynew: line 3: =~/Documents/Rails_Apps/: No such file or directory
ruby: No such file or directory -- new (LoadError)
rails new ..., notruby new ...