Hey guys im a simply guy from london lol
Ive just installed cobra but i do not have a clue how to use it. Im used to using IDE's so when it comes to command line i get lost
Now ive managed to follow all the instructions and i think its installed properly. But how do i get coding??
I have a mac. so i assume i have to use terminal for this but when i try the helloworld program i get
(kevins-mac-mini:Cobra kevinnmason$ cobra hello.cobra
-bash: cobra: command not found)
Any guidance
Forums
Fresh cobraer
4 posts
• Page 1 of 1
Re: Fresh cobraer
I'm on Mac most of the time that I use Cobra and I invoke it from the command line like you have done. Let's check if it's installed:
If so, then you just need a "cobra" script in your path:
Once you have that, future installations will update it with the correct path.
- Code: Select all
$ ls -lF /usr/local/cobra/
total 0
drwxr-xr-x 7 root wheel 238 Jul 16 18:33 Cobra-0.8.0-post/
drwxr-xr-x 7 root wheel 238 Jul 26 18:58 Cobra-2.0.50727-post/
drwxr-xr-x 7 root wheel 238 Sep 21 01:48 Cobra-4.0.30319-post/
drwxr-xr-x 3 root wheel 102 Sep 23 2009 bin/
If so, then you just need a "cobra" script in your path:
- Code: Select all
$ type -a cobra
cobra is /Users/charles/bin/cobra
$ cat bin/cobra
#!/bin/sh
exec mono "/usr/local/cobra/Cobra-4.0.30319-post/bin/cobra.exe" "$@"
Once you have that, future installations will update it with the correct path.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
Re: Fresh cobraer
I am sooo lost lol
errm i typed the first line you suggested
this is the response i got
kevins-mac-mini:~ kevinnmason$ ls -lf /usr/local/cobra
total 0
drwxr-xr-x 4 root wheel 136 4 Nov 01:46 .
drwxr-xr-x 3 root wheel 102 4 Nov 01:44 ..
drwxr-xr-x 3 root wheel 102 4 Nov 01:46 bin
drwxr-xr-x 7 root wheel 238 4 Nov 01:46 Cobra-2.0.50727-post
after that i typed the second part u suggest and i got this
kevins-mac-mini:~ kevinnmason$ type -a cobra
-bash: type: cobra: not found
kevins-mac-mini:~ kevinnmason$ cat bin/cobra
cat: bin/cobra: No such file or directory
Now all i wanna do is get to coding Ive heard so many good reviews. What do i do next? if i have installed it does cobra just work straight from the terminal or do i have to run cobra through the terminal and then code??
errm i typed the first line you suggested
this is the response i got
kevins-mac-mini:~ kevinnmason$ ls -lf /usr/local/cobra
total 0
drwxr-xr-x 4 root wheel 136 4 Nov 01:46 .
drwxr-xr-x 3 root wheel 102 4 Nov 01:44 ..
drwxr-xr-x 3 root wheel 102 4 Nov 01:46 bin
drwxr-xr-x 7 root wheel 238 4 Nov 01:46 Cobra-2.0.50727-post
after that i typed the second part u suggest and i got this
kevins-mac-mini:~ kevinnmason$ type -a cobra
-bash: type: cobra: not found
kevins-mac-mini:~ kevinnmason$ cat bin/cobra
cat: bin/cobra: No such file or directory
Now all i wanna do is get to coding Ive heard so many good reviews. What do i do next? if i have installed it does cobra just work straight from the terminal or do i have to run cobra through the terminal and then code??
- mr-mason
- Posts: 2
Re: Fresh cobraer
You're not that far off. You just need the "cobra" command to be in your PATH somewhere:
where FOO is one of the paths in $PATH. This is basic unix/linux/bash stuff. My $PATH is probably different than yours, so I can't tell you exactly where to put it. I added ~/bin to my PATH in ~/.bash_profile like so:
If you do that then you can:
You may wish to go through some bash and command line guides to get more comfortable. If you get stuck, let us know.
- Code: Select all
$ echo $PATH
.:~/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Library/Frameworks/Python.framework/Versions/2.5/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin
$ cp /usr/local/cobra/bin/cobra FOO
where FOO is one of the paths in $PATH. This is basic unix/linux/bash stuff. My $PATH is probably different than yours, so I can't tell you exactly where to put it. I added ~/bin to my PATH in ~/.bash_profile like so:
- Code: Select all
export PATH=".:~/bin:${PATH}"
If you do that then you can:
- Code: Select all
$ source ~/.bash_profile
$ mkdir ~/bin
$ cp /usr/local/cobra/bin/cobra ~/bin
You may wish to go through some bash and command line guides to get more comfortable. If you get stuck, let us know.
- Charles
- Posts: 2515
- Location: Los Angeles, CA
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 54 guests