|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Ruby. I need help getting started.
Hello folks!
I'm a nub at ruby. I have the book caled Agile Web Development with Rails (2nd Edition) and I pretty much know a half decent amount. Anywho, what I need to do is create a page that allows people to do these things: 1) Submit content (Logged in) 2) View content (Logged in or noe) 3) Create an account, and be either a finder, or a findee. (Both can submit content) 4) Let the finder be able to find findees based on the location(s) they listed themselves in. I just need help getting started. Once I'm started I'm sure I can figure out where to go from there. Thanks a bunch -Amir |
|
#2
|
||||
|
||||
|
I'm a rubyer, but not a railser, so i've lifted the next chunk off the rails site:
Code:
rails path/to/your/new/application cd path/to/your/new/application ruby script/server You're running Ruby on Rails! Follow the instructions on http://0.0.0.0:3000/ You'll need to set up models and controllers then and continue like any other rails application. Try looking at the site http://www.rubyonrails.com/
__________________
~James [Not currently seeking freelance work] Like philosophy or interested in spirituality? Philosophorum. Game Dev Experts Forums Foresight Linux - Because your desktop should be cool! Linux FAQ FedoraFAQ UbuntuGuide |
|
#3
|
|||
|
|||
|
Quote:
Thanks, but thats not exactly what I'm looking for. What I need help doing is getting the baseline of code. Like all the files and stuff. Thanks -Amir |
|
#4
|
||||
|
||||
|
Follow the docs. I can't just write your code for you, that's not what i'm here to do. I'm here to provide assistance with troubles you're having and point out helpful links.
The tutorial will be enough to get you going. |
|
#5
|
|||
|
|||
|
Just few quick questions. I didn't want to open separate thread just for this.
How is Ruby on Rails used on site? Is it something like Perl (scripting), or Ajax (framework)? Why would someone prefer Ruby over Python/Perl for scripting? IMHO, Perl is most powerful for that purpose. |
|
#6
|
||||
|
||||
|
it's done as FastCGI typically. Ruby is a wonderful language IMO, that's why people like it. Ajax isn't a framework silly.
|
|
#7
|
|||
|
|||
|
But I've heard that Perl is most powerful here. And why do you say that Ruby is wonderful language? Because of syntax, or what?
BTW, I know what Ajax is, but i don't know how to say it in english ... |
|
#8
|
||||
|
||||
|
It's flexible and the syntax is alright (i object to the constant 'end', but then python's classes constant 'self' is worse)
eg. you can use lambda expressions (blocks) effectively. Like we can loop through a list and print each item like so: list.each {|z| puts z} Because ruby operates solely on return values (unless you use an inplace modifying method), you can do things like this "my string, hello world".reverse.split().reverse.remove(2).each {|x| puts "and the token is: #{x}"} or something like that. |
|
#9
|
|||
|
|||
|
Quote:
Nice... Then why most people use perl instead of ruby for scripting? It's not that hard to learn new language. BTW, I learned PHP&MySQL basics yesterday, and i got book about Joomla! and started reading it. It's amazing what can you do with PHP&MySQL... And i'll probably need something for scripting sometimes. As i (still) don't know Ruby/Perl, i wanna know which one's best. Perl has excellent string manipulation and regexp, and ruby... i don't know. |
|
#10
|
||||
|
||||
|
Ruby is the better language, perl has CPAN and is installed on more servers.
Essentially, ruby will make more readable code and is more fun to piss around with, perl is usually quicker to develop applications because there's usually a module that does exactly what you need. PHP is also a scripting language fwiw. |
|
#11
|
|||
|
|||
|
I'm still PHP beginner. Is it smart to use other scripting languages? PHP supports OO, Polymorphism, etc...
btw, if i ever need scripting language, i'll try Perl. Good readability isn't important to me. Perl has big community, and lots of modules. Also, I rarely see someone looking for Ruby programmers. I see that PHP/MySQL/Perl programmer are most wanted. And i'm business oriented ![]() |
|
#12
|
||||
|
||||
|
I could have sworn you came to this forum claiming .net experience...
PHP is the most wanted IME, perl a touch less so. I'd take php, you will need a good 8 months to properly get to grips with perl (buying a small o'reilly reference has been essential to my perl programming, the syntax is often so tricky that i want to doublecheck it instead of testing and risking it being wrong) |
|
#13
|
|||
|