This forum is no longer active. Please post your questions to our new community site

problem starting up rails on osx Leopard

Subscribe to problem starting up rails on osx Leopard 16 post(s), 3 voice(s)

 
Avatar Stefan_D 10 post(s)

Hello, whenever I try to start up the rails enviroment via the rubyconsole this is what starts up…
Last login: Fri Jan 25 21:46:15 on ttys000
/Applications/rubystack-1.0/rubyconsole ; exit;
Macintosh:~ stefandozier$ /Applications/rubystack-1.0/rubyconsole ; exit;
bash-3.2$

now something tells me thats not what i want? also im using netbeans 6.0, does anyone here know how to point netbeans to the rubystack? im totally lost.

Thanks
Stefan

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Stefan,

The rubyconsole is a script to load the environment variables to can use ruby binaries, subversion, mysql, etc. When you are in the rubyconsole you can go to ‘projects’ folder and start ‘rubystack’ project for example:

{installation_directory}/projects/rubystack$ script/server

You can see something like this:

=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

  • Starting Mongrel listening at 0.0.0.0:3000
  • Starting Rails with development environment…
    GLoc v1.1 running in development mode. Strings can be modified at runtime.
  • Rails loaded.
  • Loading any Rails specific GemPlugins
  • Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart).
  • Rails signals registered. HUP => reload (without restart). It might not work well.
  • Mongrel 1.1 available at 0.0.0.0:3000
  • Use CTRL-C to stop.

You can type into your browser http://127.0.0.1:3000 and you can see the example rails application. In addition to this, you can find more information about RubyStack at RubyStack Quick Start Guide.

Cheers.

 
Avatar Stefan_D 10 post(s)

ahhh ok, thanks! am I going to need Xcode 3.0 or MacPorts for leopard?

 
Avatar Stefan_D 10 post(s)

hmmm whenever I start the server console from within the projects folder this is what I get…

Macintosh:~ stefandozier$ /Applications/rubystack-1.0/projects/rubystack/script/server ; exit;
env: ruby: No such file or directory
logout

[Process completed]

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

ahhh ok, thanks! am I going to need Xcode 3.0 or MacPorts for leopard?

No, these applications are not required. RubyStack has all required software to deploy a Ruby On Rails application.

Macintosh:~ stefandozier$ /Applications/rubystack-1.0/projects/rubystack/script/server ; exit;
env: ruby: No such file or directory
logout

Sorry, I haven’t explained well. First, you have to start the rubyconsole:

$/Applications/rubystack-1.0/rubyconsole

And then go to rubystack example project:

$ cd /Applications/rubystack-1.0/projects/rubystack/

Finally, you can start the sample application:

$ script/server

or

$ ruby script/server

 
Avatar Stefan_D 10 post(s)

Ok heres what I did, I went to the rubystack-1.0 directory and click on the rubyconsole which opened in the terminal, then I typed ruby script/server in the terminal and this is what i am getting…

/Applications/rubystack-1.0/rubyconsole ; exit;
Macintosh:~ stefandozier$ /Applications/rubystack-1.0/rubyconsole ; exit;
bash-3.2$ ruby script/server
/Applications/rubystack-1.0/ruby/bin/.ruby.bin: No such file or directory—script/server (LoadError)
bash-3.2$

 
Avatar antonio 621 post(s)

Hi Stefan,

You forgot to change directory to

/Applications/rubystack-1.0/projects/rubystack

before executing

ruby script/server

 
Avatar Stefan_D 10 post(s)

I did that, it dosnt work, I cannot reset the server or start it….

Macintosh:rubystack-1.0 stefandozier$ cd projects
Macintosh:projects stefandozier$ cd rubystack
Macintosh:rubystack stefandozier$ script/server
env: ruby: No such file or directory
Macintosh:rubystack stefandozier$

 
Avatar Stefan_D 10 post(s)

when I start the rubyconsole from within the terminal all it does is go to bash and from there I cant do anything…

Macintosh:~ stefandozier$ /Applications/rubystack-1.0/rubyconsole
bash-3.2$

 
Avatar Stefan_D 10 post(s)

Ok so I opend up one terminal and started the rubyconsole…

Macintosh:~ stefandozier$ /Applications/rubystack-1.0/rubyconsole
bash-3.2$

then I opend another terminal window, while leaving that one open and tried to reset the server…

Macintosh:~ stefandozier$ cd /Applications/rubystack-1.0/projects/rubystack/
Macintosh:rubystack stefandozier$ script/server
env: ruby: No such file or directory
Macintosh:rubystack stefandozier$ ruby script/server
-bash: ruby: command not found
Macintosh:rubystack stefandozier$

didnt work.

 
Avatar antonio 621 post(s)

Everything is done from the rubyconsole terminal, you don’t have to open another one. So,

1) Start the rubyconsole
2) In the rubyconsole, change the directory to projects/rubystack
3) Execute “ruby script/server”

 
Avatar Stefan_D 10 post(s)

I did that, Still the same problem.

 
Avatar Stefan_D 10 post(s)

I cant change directories from within the rubyconsole terminal, it takes me straight to Bash when I open the rubyconsole which wont let me change directories

 
Avatar antonio 621 post(s)

What’s the error message when trying to change the working directory?

 
Avatar Stefan_D 10 post(s)

when I try to change directories it just goes back to bash

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi Stefan,

you can change the directory into the rubyconsole, but you can’t see the directory at the beginning. Try to this:

Start the rubyconsole and type this:

cd /Applications/rubystack-1.0/projects/rubystack

then, you can see that you are in the rubystack sample project folder:

pwd

Finally execute:

script/server

And go to your Safari browser at http://127.0.0.1:3000

If you don’t like this console you can load the environment variables in your terminal. Open your terminal and go to rubystack installation directory:

cd /Applications/rubystack-1.0/

then, you can load the ruby environment with

. scripts/setenv.sh

later you can go to the rubystack sample project,

cd projects/rubystack

and finally start the sample application,

script/server

Cheers