Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Trouble with SSH shell
Old 08-28-2007, 12:56 AM Trouble with SSH shell
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
http://forums.site5.com/showthread.php?t=11954
I am on step 9 and I can't figure out how to do this correctly if someone could help me that would be great.
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
 
Register now for full access!
Old 08-28-2007, 06:51 PM Re: Trouble with SSH shell
Skilled Talker

Posts: 62
Name: Tom Wright
Location: Brighton, UK
Trades: 0
OK, first off: the reason not many people have replied to this thread is because the tutorial seems to be about Gems for Rails (which I guess is a ruby variant?). Either way, it's not really about php at all.
Moving on from that - what is the nature of your problem? What do you do and what happens? What editor are you using to add the 'GEM_PATH'?
Other things that occur to me would be the apparent typo 'envorinments.rb', I'm pretty sure thats supposed to be 'environments.rb'.
__________________
My site:
Please login or register to view this content. Registration is FREE
tomythius is offline
Reply With Quote
View Public Profile
 
Old 08-28-2007, 09:21 PM Re: Trouble with SSH shell
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
Im sorry Goheadtry but is it more or are you trying EVERYthing possible and seemly being lcue less with most of it?

i think you should focus more on one area -> master it -> move on to something else.

from yours posts your diving into 20 differant topics at once. :s
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-29-2007, 04:49 PM Re: Trouble with SSH shell
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
Okay I can't get past step 9 because I can't figure out which key to push in the ssh client name "PUTTY" so

$ vi ~/RailsApps/app1/config/environment.rb
ENV['GEM_PATH'] = '/home/yourusername/gems:/usr/lib/ruby/gems/1.8'

is the code I can't figure out how to make it save I am still in a mode where it is allowing me to type I just need to know which Key I need to push after I do this so it saves. Here is an image of it

__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
Old 08-29-2007, 04:58 PM Re: Trouble with SSH shell
Super Talker

Posts: 130
Trades: 0
when you enter the command vi you are opening or creating a file. So what this is telling you to do is to open the file environment.rb. Once this file is open, that's where you would edit the GEM_PATH.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
Old 08-29-2007, 05:05 PM Re: Trouble with SSH shell
Super Talker

Posts: 130
Trades: 0
I always like to make sure that the file exists because otherwise when you use the vi command, it'll automatically create the file. So when you expect to see a config file, it'll be empty if you have the wrong path to the real file.

So I would try this first.

Command to enter: cd ~/RailsApps/app1/config

Command to enter: ls

Do you see a file called environment.rb?

If you do:

command to enter: cp environment.rb environment_copy.rb

command to enter: vi environment.rb

vi starts in command mode, to start type you need to hit the lowercase i button.

I would also suggest reading up on how to use vi.
__________________
flann

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
flann is offline
Reply With Quote
View Public Profile
 
Old 08-29-2007, 05:47 PM Re: Trouble with SSH shell
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
If the file don't exists, vi will create a new one when you save it.
If the file exists, then you'll see it's content when vi loads.
So nothing to fear here.

Basics commands for VI are:
Code:
! -> force the command 
  q! means quit even if I don't have saved the file
  w! means try to write the file even if i don't have the permission
i -> enter writing mode
esc -> go back from writing mode to command mode
number + G -> go to the line number x
G -> Go to the end of the file
o (the letter) -> Add a line after the cursor and enter edit mode
O (the letter) -> add a line before the cursor and enter edit mode
w -> write file
w! -> Force to write the file (if the content changed, or sometimes when permissions on the file are messed up)
q -> quit vi
wq -> write and exit vi
w!q -> try to force the file write even if the permissions are wrong, and exit
%s/aaa/bbb/gi -> replace every "aaa" with "bbb" through all the document
/ + aa-> Search "aa" from the current cursor position
dd -> delete the line under the cursor
d+ uparrow / down arrow -> delete the current line + next or previous one
u -> undo
You must hit "esc" to switch back from writing mode to command mode.
Remember that you need to be in command mode for those to work, and that command start with : .
So, to write the file when you are editing it, type the sequence
Code:
esc : w i
to exit to command mode, write the file, and enter back in edit mode.


2 things: Try to use vim, it's more advanced. You may already use it when you type vi, it's distribution dependant.
If vi is too much, try nano. It's often installed by default, and it's operation mode is more like you are used to, for sure.
Remember than in command mode, you cannot write, and in writing mode, you must go back to command mode to do an action.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 08-29-2007 at 05:50 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 08-31-2007, 04:35 PM Re: Trouble with SSH shell
Extreme Talker

Posts: 182
Trades: 0
vi ftw!

however, if you are just starting out w/ a linux editor, nano is a more noob friendly editor. try typing 'nano filename.txt' instead of 'vi filename.txt'. It may already be installed.
bhgchris is offline
Reply With Quote
View Public Profile
 
Old 09-01-2007, 02:09 PM Re: Trouble with SSH shell
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Quote:
Originally Posted by bhgchris View Post
vi ftw!

however, if you are just starting out w/ a linux editor, nano is a more noob friendly editor. try typing 'nano filename.txt' instead of 'vi filename.txt'. It may already be installed.
If not, try
Code:
yum nano
and then
Code:
nano environment.rb
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Trouble with SSH shell
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28891 seconds with 12 queries