PDA

View Full Version : ruby on rails


krisleech
05-26-2005, 09:01 AM
Hi ya, does FQ have Ruby installed?

Searching the forum I have see Ruby upgrade notices but nothing in the actual package specs.

I actually intrested in Ruby on Rails: http://www.rubyonrails.org/

Do you know if Ruby on Rails is something that needs to be complied in to or installed server side or it is just uploaded and used like a PHP class/script.

Thanks, K.

Bruce
05-26-2005, 06:43 PM
Hi ya, does FQ have Ruby installed?Yes, version 1.8.1 currently.

Do you know if Ruby on Rails is something that needs to be complied in to or installed server side or it is just uploaded and used like a PHP class/script.According to this page in the Ruby on Rails Wiki (http://wiki.rubyonrails.com/rails/show/HowtoUseSymLinksToGraftRailsOntoYourWebsite), it should be possible to just symlink (or probably even copy) your application into your web space and have it work. However, we have no experience with Ruby on Rails, and little experience with Ruby itself (other than building and installing it), so this is mostly speculation based on our reading of the web documentation.

hobbes
05-26-2005, 06:53 PM
You may need 1.8.2 for Rails

http://wiki.rubyonrails.com/rails/show/GettingStartedWithRails

krisleech
05-27-2005, 08:08 AM
You may need 1.8.2 for Rails

http://wiki.rubyonrails.com/rails/show/GettingStartedWithRails

Well that puts a dampner on using rails.. Any FQ staff know if there is to be an update to Ruby scheduled?

By the way I am looking at AJAX frameworks, anyone have any experience with any AJAX frameworks?

So far I have identified: PRADO, Ruby on rails, JPSPAN and QWAD and the amazing BackBase which has flash like interactivity but producues valid XHTML.


Thanks, K.

Bruce
05-27-2005, 06:54 PM
Any FQ staff know if there is to be an update to Ruby scheduled?Done :yeah:

krisleech
05-28-2005, 08:11 AM
Done :yeah:

:smile:
Great, do you work at FQ Bruce?

Snarpy
05-28-2005, 12:02 PM
The FQ team (most available on-line):
http://www.futurequest.net/About/

Bruce is second from right, in the back.

Snarpy

TVB
05-28-2005, 01:16 PM
Done :yeah:


Wow...I kind of like that ask and you shall receive responsivenes--even if I don't have a clue what is being requested. It's just another reason I like being at FQ.

sheila
05-28-2005, 04:31 PM
The little

http://www.aota.net/images/smallfuturequestlogo.gif

under the name indicates a FutureQuest staff member. Only WE get to have that logo under our names. ;)

Andilinks
05-28-2005, 04:57 PM
Only WE get to have that logo under our names. And THEY get their names in BOLD.

krisleech
05-31-2005, 06:46 AM
a ha... thanks very much Bruce. :yeah:

krisleech
06-17-2005, 10:54 AM
OK so I have uploaded Ruby on rails, and i need to config it, anyone done this?
I am having problems with point 2 and 3 below:

1. The log and public directories must be writable to the web server (chmod -R 775 log and chmod -R 775 public).
2. The shebang line in the public/dispatch* files must reference your Ruby installation.
You might need to change it to #!/usr/bin/env ruby or point directly at the installation.
3. Rails on Apache needs to have the cgi handler and mod_rewrite enabled.
Somewhere in your httpd.conf, you should have:
AddHandler cgi-script .cgi
LoadModule rewrite_module libexec/httpd/mod_rewrite.so
AddModule mod_rewrite.c

Thank you very much for the help, K.

sheila
06-17-2005, 01:58 PM
For #2, in a telnet session, issue the command

$which ruby

When I do this on my server, I get:
/usr/bin/ruby

For #3, both are enabled on the FutureQuest servers. You don't need to do anything.

sheila
06-17-2005, 01:59 PM
P.S. From #1, since the web server at FutureQuest runs CGI under the account UserID, 755 perms should be sufficient? (As opposed to 775)

krisleech
06-22-2005, 08:43 AM
Thanks sheila, it helped.
How do I issue commands to rails? For example to start a new project you do: "rails projname" and it sets up the directory structure etc.
And then something like: ruby script\generate controller MyTest

These would normally be done via the DOS prompt, i have tried telnet but i guess that is not correct?

Thanks Kris.

lynxtrax
06-22-2005, 05:19 PM
Hey Kris,
did you succeed in installing ruby on rails? The last time I explored installing ruby on rails on FQ, it appeared that the gem package installer wasn't installed and I didn't really have time to examine manual installation.

-chris

krisleech
06-23-2005, 05:18 AM
Im not entirely sure if I have it installed, I think you can just upload the Rails folders, change the config files as above and provided Ruby is installed it should work.

I have yet to *actually* get it working as I dont know how to issue commands to Ruby.

Ive also tried installing Ruby/Rails on my local server with no luck so far (Ruby was fine, a one click install) but again I cant get Rails to work _yet_.

I dont know if Gem is installed but I dont think it essential.

K.

sheila
06-23-2005, 01:47 PM
After a cursory glance at this article (http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2), it looks like "rails" is an executable on the Windows machine that has been put into the default path.

If you have installed rails on your FutureQuest web space, it has not been put in the default path automatically. Either you would have to do this yourself, or else use the full path to rails when you try to start your project.

So in telnet, something like
/big/dom/xdomain/path/to/rails projname

???

bigjossey
06-23-2005, 03:05 PM
Here is a good tutorial, it might help with your search

http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1

krisleech
06-23-2005, 04:10 PM
Thanks, I have those two tutorials already, they are what i have been trying to follow.

I tried cd-ing in telnet to the script folder in the rails install and then typing generate (which is an app to make the project files) but it said bash could not find the generate file, yet it is clearly there when i do ls command...

[******@FQ-Qbert:/big/dom/x******/www/RubyOnRails/script ]$ bash: bash:: command not found

and i cant even find the rails exe file which should set up a project

lynxtrax
06-25-2005, 04:56 AM
Hey Kris,
I'm on vacation right now so sorry for the quick reply, but you might want to check out http://www.pragmaticprogrammer.com/titles/rails/

hth

sheila
06-27-2005, 07:20 PM
I tried cd-ing in telnet to the script folder in the rails install and then typing generate (which is an app to make the project files) but it said bash could not find the generate file, yet it is clearly there when i do ls command...

[******@FQ-Qbert:/big/dom/x******/www/RubyOnRails/script ]$ bash: bash:: command not found If you are in the directory where an executable file is located, and wish to execute that file, then you need to type more than just the filename. In the case of the "generate" file, you would need to type:

./generate

The reason for this, is that the current directory is not included in the $PATH environment variable (for security reasons).

and i cant even find the rails exe file which should set up a project
An exe file wouldn't work on a Linux server? That's for windows only...?

krisleech
06-30-2005, 06:04 AM
An exe file wouldn't work on a Linux server? That's for windows only...?

I know Win code will not work on Linux but does Linux not have EXE's at all? Or is its compiled code / software called sometihng else?

Thanks, K.

krisleech
06-30-2005, 06:06 AM
Hey Kris,
I'm on vacation right now so sorry for the quick reply, but you might want to check out http://www.pragmaticprogrammer.com/titles/rails/

hth

I already spotted this, only another few days until release! (4th July), I considered getting the beta PDF but i might as well wait.

lynxtrax
06-30-2005, 07:27 AM
I read through the pdf on the plane - it's a great book but doesn't really go into installation issues for shared webhosts.

sheila
06-30-2005, 10:00 PM
I know Win code will not work on Linux but does Linux not have EXE's at all? Or is its compiled code / software called sometihng else?
I'm no Linux expert, but I don't recall seeing any executable for Linux that had an exe extension. I'm not saying there is no such thing, but it is certainly not common.

Many Linux binaries have no extension at all. (I really want to say "most" but not being an expert in this area, am afraid someone will come along and "correct" me. I hate being corrected. :P )

Consider:

/usr/bin/ruby

That is a binary. There is no extension.

Randall
07-01-2005, 12:28 AM
I'm no Linux expert, but I don't recall seeing any executable for Linux that had an exe extension. I'm not saying there is no such thing, but it is certainly not common. I am alpha testing just such a beast at this very moment. But that's because the author is used to dealing with Windows binaries. :wink:

Randall

sheila
07-01-2005, 02:30 AM
I am alpha testing just such a beast at this very moment. But that's because the author is used to dealing with Windows binaries. :wink:Thus my disclaimer. It certainly was a scenario in my mind when thus disclaiming. :rasberry: