WebFaction
Community site: login faq

I have a static application that I'm trying to add the webby gem to. I setup local gems (based on the recommended way in another question), but gem install webby doesn't seem to install the command only the documentation. Webby builds a static site (all I need for this), but supports some templating and things of that nature. I don't need rails.

ps. I'm historically a Windows dude, so please humor me.

asked 22 Mar '11, 23:35

cromwellryan
112
accept rate: 0%

Hi,

Can you give us the exact command you ran to install it? If you'd feel better about not putting your user info here you can send us a ticket. :)

(22 Mar '11, 23:39) klynton

Sure. SSH into the server, then gem install webby. Or are you referring to the install of local gems?

(22 Mar '11, 23:43) cromwellryan

gem list shows webby 0.9.4. I wonder if there is a path problem. Since it's a static site, the last two steps of http://community.webfaction.com/questions/1741/how-to-install-rubygems-locally didn't seem to apply. I'm referring to the recommended way in there.

(22 Mar '11, 23:45) cromwellryan

Hi,

It looks like your PATH may not be including your gem path or your ruby lib path. Can you give me the out put of "echo $PATH"?

(23 Mar '11, 00:52) klynton

This is $PATH after installing gems to /webapps/<app>/current /home/cincycleancode/webapps/cincycleancoders/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

Oddly enough I used --prefix=$HOME/webapps/cincycleancode/current when installing local gems, but the bin path is not under current.

Restarting the shell I lose the first path and get: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

Current is a result off the capistrano deployment.

(23 Mar '11, 06:29) cromwellryan

any thoughts?

(24 Mar '11, 21:24) cromwellryan

Hi,

You can retain environment variables between sessions if you add them to your .bashrc so adding

export /home/cincycleancode/webapps/cincycleancoders/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

to /home/cincycleancode/.bashrc would help.

(24 Mar '11, 21:53) neeravk

So I've done this, but I don't know how to get it to reload the path. When I jump back into ssh, $PATH doesn't have what I placed in .bashrc which is:

PATH=$PATH:$HOME/.gem/ruby/1.8/bin

(26 Mar '11, 14:19) cromwellryan

.bashrc is for 'remote connections', things like git or another program using SSH as your user. .bash_profile is for user sessions, so you will also want to add the changes to .bash_profile to make them apply when you login using SSH.

(26 Mar '11, 17:04) johns

Gave tha a try, but I'm doing something wrong.

Here's both files right now.
https://gist.github.com/889910

I leave ssh via exit and log back in. $PATH returns: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin

(27 Mar '11, 21:59) cromwellryan

So I just noticed that my .bash_profile isn't even being loaded when I ssh in.

. .bash_profile changes my prompt and adds everything to the path. WTF?

Same goes for . .bashrc.

(27 Mar '11, 22:22) cromwellryan

Hi,

Your .bash* stuff should be run each time you log in. Is there anything particular about the way you are logging in that we could use to look into this a little further? Are you using keys or a password? Which program are you using to log in?

(27 Mar '11, 23:55) klynton

I figured out this problem at least. I created a specific ssh account that I wanted to use for the app. I chose the bin/sh profile. I switched to my standard or original account for ssh and my profile loads appropriately.

I'm installing local gems again using my personal ssh to ~/webapps/<app> hoping this works out. I'm doing this because bundler requires > 1.3.6.

Is there a plan to upgrade the system gems by any chance?

(28 Mar '11, 09:20) cromwellryan

We do not have any immediate plans to do so. You should be able to install gems as needed by following our documentation. If you are still having trouble, or have trouble in the future, feel free to open a support ticket and we will review your configuration.

In regards to your path variables, the line in your .bashrc file should be:

export PATH=$PATH:$HOME/.gem/ruby/1.8/bin

not:

PATH=$PATH:$HOME/.gem/ruby/1.8/bin

(28 Mar '11, 09:55) aaronh ♦♦
showing 5 of 14 show 9 more comments

There were two problems.

The first was that I had created an SSH account with the bin/sh shell. This caused my .bash_profile not to be loaded. I really don't know what the bin/sh shell is, but it seemed close to ssh, so I picked it. Obviously need to read up there.

The second was that my deploy.rb for capistrano had this line: default_run_options[:pty] = true

that keeps your profile from loading. Once I did those things, I was golden.

permanent link

answered 28 Mar '11, 13:05

cromwellryan
112
accept rate: 0%

The shell you are used to using is called bash,(born again shell) the sh program is the older, shell. It does not have all the defaults bash has. There are a few others too, but bash and sh are the most common. Thanks for letting us know your fix.

(28 Mar '11, 13:09) johns
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×81
×11
×1

question asked: 22 Mar '11, 23:35

question was seen: 2,855 times

last updated: 28 Mar '11, 13:09

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM