icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » All Things Techy » Site Maintenance » Installing Ruby

Site Maintenance Program updates, securing your website, creating backups.

Reply
 
LinkBack Thread Tools Search this Thread
Old June 27th, 2005, 3:29 AM   #1 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
Installing Ruby

Well, I'm curious about Ruby and figure before I did any begging to have it on Pipe or moved to a server with Ruby, I would try it. Never know, I might not like it. Anyhow, I have Ruby installed at C:/ruby

I've followed everything I can and for some reason I can't figure out how the server thing actually works. How can I view the files and whatnot through apache? I'm not a genius in some areas, and this would be it... There's just some things that stump me. I've probably overlooked a config text or something.

Any help would be cool.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 27th, 2005, 7:20 PM   #2 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
My brain got smart and I figured it out. I ended up uninstalling, deleting everything and starting from scratch following two walkthroughs and had great success. Everything runs great though not so much luck with Apache. The "ruby script/server" works excellent though.

Here's my new problem... I need to get mySQL working. I thought it said it came with native support somewhere, but apparently it doesn't. Any pointers with this?
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2005, 4:31 PM   #3 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Haugy,

You are a genius, but I don't know how much you know about Ruby. So here are some "I assume you know nothing" explanations. Take what you need, share with others.

First of all, you mention script/server which leads me to believe you have Rails installed. Ruby and Rails are distinct...Ruby is like Perl, Rails is like any framework written in Perl. I think the name 'Ruby on Rails' fuels this confusion. It's the language Ruby, on the framework Rails.

Ruby doesn't require Apache to run, so the first step in your install should be making sure Ruby works without it. It's like Perl, or PHP, in that there is a 'ruby' executable that can be fed .rb files and execute them.

To get Apache to interpret Ruby files, you have a few different options. You can get and install mod_ruby, which sucks. You can run Ruby scripts as CGI. You can install mod_fcgi and run Ruby scripts with FastCGI. You can use lighttpd to run Ruby. Or you can use WEBrick, an all Ruby web server.

MySQL troubles? As I don't know if you're using Rails or not...

Rails should come with MySQL support. If you're having a specific issue, maybe I can help if you post it.

Ruby does not come with MySQL support. Luckily, the language is very easy to extend. Both of these are a snap to install:

Ruby-MySQL: A pure Ruby MySQL driver: http://www.tmtm.org/en/ruby/mysql/

MySQL-Ruby: A MySQL C extension to Ruby: http://www.tmtm.org/en/mysql/ruby/


More links!

Ruby's core API: http://www.ruby-doc.org/core/

Ruby's standard libraries API: http://www.ruby-doc.org/stdlib/

Rails' API: http://api.rubyonrails.com/

One Click Ruby Windows Installer: http://rubyforge.org/projects/rubyinstaller/

Win32Utils: http://rubyforge.org/projects/win32utils/

Finally, if you are indeed trying out Rails might I suggest the essential Rolling on Rails articles from O'Reilly & friends. Curt Hibbs wrote it, he's a nice Ruby fellow.
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2005, 5:36 PM   #4 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
Hey Ghostcop, thanks for the reply.

I'm really no genius, but if you sincerely meant it, thanks . My knowledge of Ruby is limited to what my old professor has posted on his blog, what's been posted here and a few things here and there from documentation I've read.

Yep, I have Ruby installed, then installed Rails through Gem. I was well aware once I started going that Rails was a framework that was separate from Ruby. Ruby and Rails worked fine; however, I was getting an error when I was trying to follow a base tutorial that dealt with mySQL.

I was able to open up the .rb files with no problems, so Ruby was working. I actually ended up decided not to use Apache though, simply just because I wanted to get a feel for it so I could decide whether to pursue going further with it or not. I don't actually need mySQL support for Ruby, but rather Rails, so as you say it supports it by default, that makes me wonder why it wasn't working.

I'll get the error momentarily. During some of my editing of files, I kind of screwed over the Ruby, making it unuseable... So I'll be whiping it and redoing everything.

Thanks for the links too. I'll be sure to put them to some good use.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2005, 6:01 PM   #5 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
Quote:
In the configuration wizard, you can also just accept all of the defaults, except that in the security panel you must uncheck the "Modify Security Settings" checkbox (Figure 4). This is because starting with version 4.1.7, MySQL uses a new authentication algorithm that is not compatible with older client software, including the current version of Rails. By unchecking this box, you can access MySQL without a password.
Ok.. I use mySQL 4.1.12, and it came in a packaged setup, VertrigoServ, so I have a feelings that might be the issue right there. I'll give a new, seperate installation a shot to see where that takes me.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 2nd, 2005, 6:45 PM   #6 (permalink)
H
after g, before i
Resident.
 
H's Avatar
 
Joined in Jul 2004
Lives in N,BC,CA
8,087 posts
Gave thanks: 48
Thanked 131 times
Awesome, with using the independant mySQL installation, it works great. Seems that documenation proved it's value.

Thanks again Ghostcop. I now have another project to learn over my summer.
H is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 3rd, 2005, 5:58 AM   #7 (permalink)
Surpass Fan
On a golden path...
 
Joined in Nov 2004
Lives in San Francisco
364 posts
Gave thanks: 0
Thanked 3 times
Good luck with it. I fell in love with Ruby and Rails, and lately I'm swamped with work. I still do some PHP, but not nearly as much. Ruby is just too good.
ghostcop is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
Pingbacks are On
Refbacks are On