jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

installation: missing dependencies, no serve command, no localhost.4000 #98

Closed yodrew closed 11 years ago

yodrew commented 11 years ago

Hi, I have had 3 problems with installation. I have Crunchbang Squeezy distro (debian-base). Aptitude works usually.

  1. When installing serve, dependencies were missing: i18n, then i18n-0.6.1 for activesupport. Had to install serve 2-3 times before it showed up in gem list.
  2. Next, "cd ~/serve", then "serve". Bash says "command not found".
  3. Tried "gem serve". That gave me "server started at http://0.0.0.0:8808" not localhost:4000.
    • 0.0.0.0:8808 showed me a list of installed gems.
    • I tried browsing to localhost:4000, got "Unable to establish a connection"

What do you think?

jlong commented 11 years ago

"gem serve" is a documentation viewer for your gems. It has nothing to do with Serve.

It sounds like your gems/bin folder may not be in your path. It must be in your path in order for your shell to find the "serve" command.

What is the output of this command?

echo $PATH

Also show me the output of:

gem which serve
yodrew commented 11 years ago

Ok. Thanks.

Here are the outputs you asked about:

echo $PATH: /usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

gem which serve /var/lib/gems/1.8/gems/serve-1.5.2/lib/serve.rb

On 4/29/13, John W. Long notifications@github.com wrote:

"gem serve" is a documentation viewer for your gems. It has nothing to do with Serve.

It sounds like your gems/bin folder may not be in your path. It must be in your path in order for your shell to find the "serve" command.

What is the output of this command?

echo $PATH

Also show me the output of:

gem which serve

Reply to this email directly or view it on GitHub: https://github.com/jlong/serve/issues/98#issuecomment-17168423

the darkness conjecture — http://andrewdurham.com

jlong commented 11 years ago

Looks like you need to add the bin dir to your ~/.bashrc or ~/.bash_profile:

export PATH=/var/lib/gems/1.8/bin:$PATH

After doing so you will need to reload the file:

source ~/.bashrc

Or,

source ~/.bash_profile

See also: https://help.ubuntu.com/community/RubyOnRails#Installing%20RubyGems

And: http://stackoverflow.com/questions/5616156/rubygems-doesnt-add-var-lib-gems-1-8-bin-to-path