-- --
2011-Sep-28 14:09 UTC
First time with Ruby - how to print "Hello World!" via web-server
Hello Everyone, first off - I''m NOT a programmer. I know HTML/CSS very well and PHP quite well, yet not I''m in need of a more "active" language and I''ve decided to go with Ruby. Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers the most basic question - what exactly do I have to upload to the server to simply get a (any) response from Ruby (through a browser, using a regular shared webhosting). The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a specific file structure (controllers, models, views) but still - neither of the 30+ tutorials I''ve browsed through tells me: - How many files exactly do I require for a simple "Hello World!"? - What extensions should these files have? - Where to put which files? - What the hell should these files contain? Now, I can "play" with Ruby via the command line locally and I can just create an .rb file and run it from there, but that''s not the point, I want it to show online via a browser and as ridiculous as it sounds - I don''t know how to do that? Add. infos: - I''m trying to run it on a cheap shared web-hosting (Linux server). - Ruby on Rails + gems are installed there, can access them via the cPanel. - I''ve created a test-app through the cPanel - with success. - I''ve created a rewrite - I can access the subdomain via my browser and I''ll see the "Welcome aboard" start page. What now? I just can''t continue to learn the language via simple out-of-context examples via the command line while I have no idea where to upload which files to make it really function on-line :( Please help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Daniel Nachbar
2011-Sep-28 14:24 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
On Sep 28, 10:09 am, -- -- <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers > the most basic question - what exactly do I have to upload to the server > to simply get a (any) response from Ruby (through a browser, using a > regular shared webhosting). ...Have you looked at http://ruby.railstutorial.org/ ? In particular, check out "Lesson 1: From zero to deploy" After working through that, you will probably be able to get started in your environment. Dan Nachbar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Danaka Kahn
2011-Sep-28 14:27 UTC
First time with Ruby - how to print "Hello World!" via web-server
On Wed, Sep 28, 2011 at 10:09 AM, -- -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello Everyone, > > first off - I''m NOT a programmer. I know HTML/CSS very well and PHP > quite well, yet not I''m in need of a more "active" language and I''ve > decided to go with Ruby. > > Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers > the most basic question - what exactly do I have to upload to the server > to simply get a (any) response from Ruby (through a browser, using a > regular shared webhosting). > > The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a > specific file structure (controllers, models, views) but still - neither > of the 30+ tutorials I''ve browsed through tells me: > - How many files exactly do I require for a simple "Hello World!"? >You should google for tutorials on installing ruby and rails on your computer and then how to create a rails project via the console using the ''rails new'' command. This command creates an app structure and then probably such a tutorial will show you how to render a page, or better, show you how to create a simple CRUD model. So your steps are: 1) Install ruby and rails locally 2) Genearate a project: ''rails new myproject'' 3) Create some content 4) Deploy somewhere. I recommend you use Heroku as it will be the simplest way for you to get something on the web.> - What extensions should these files have? > - Where to put which files? > - What the hell should these files contain? > > Now, I can "play" with Ruby via the command line locally and I can just > create an .rb file and run it from there, but that''s not the point, I > want it to show online via a browser and as ridiculous as it sounds - I > don''t know how to do that? > > Add. infos: > - I''m trying to run it on a cheap shared web-hosting (Linux server). > - Ruby on Rails + gems are installed there, can access them via the > cPanel. > - I''ve created a test-app through the cPanel - with success. > - I''ve created a rewrite > - I can access the subdomain via my browser and I''ll see the "Welcome > aboard" start page. > > What now? > > I just can''t continue to learn the language via simple out-of-context > examples via the command line while I have no idea where to upload which > files to make it really function on-line :( > > Please help. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
joao souza
2011-Sep-28 14:28 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
Hi, This is the best tutorial that i saw about Rails... http://ruby.railstutorial.org/chapters/static-pages#top I think that you''ll find the answers there. Note. Sorry about my english, this is not my primary language. On Wed, Sep 28, 2011 at 11:09 AM, -- -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello Everyone, > > first off - I''m NOT a programmer. I know HTML/CSS very well and PHP > quite well, yet not I''m in need of a more "active" language and I''ve > decided to go with Ruby. > > Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers > the most basic question - what exactly do I have to upload to the server > to simply get a (any) response from Ruby (through a browser, using a > regular shared webhosting). > > The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a > specific file structure (controllers, models, views) but still - neither > of the 30+ tutorials I''ve browsed through tells me: > - How many files exactly do I require for a simple "Hello World!"? > - What extensions should these files have? > - Where to put which files? > - What the hell should these files contain? > > Now, I can "play" with Ruby via the command line locally and I can just > create an .rb file and run it from there, but that''s not the point, I > want it to show online via a browser and as ridiculous as it sounds - I > don''t know how to do that? > > Add. infos: > - I''m trying to run it on a cheap shared web-hosting (Linux server). > - Ruby on Rails + gems are installed there, can access them via the > cPanel. > - I''ve created a test-app through the cPanel - with success. > - I''ve created a rewrite > - I can access the subdomain via my browser and I''ll see the "Welcome > aboard" start page. > > What now? > > I just can''t continue to learn the language via simple out-of-context > examples via the command line while I have no idea where to upload which > files to make it really function on-line :( > > Please help. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Everaldo Gomes
2011-Sep-28 14:35 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
http://www.sinatrarb.com/ -> If you''re looking for a Hello World application with Ruby (independent from Rails) On Wed, Sep 28, 2011 at 11:27 AM, Danaka Kahn <structuralartistry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > On Wed, Sep 28, 2011 at 10:09 AM, -- -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> Hello Everyone, >> >> first off - I''m NOT a programmer. I know HTML/CSS very well and PHP >> quite well, yet not I''m in need of a more "active" language and I''ve >> decided to go with Ruby. >> >> Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers >> the most basic question - what exactly do I have to upload to the server >> to simply get a (any) response from Ruby (through a browser, using a >> regular shared webhosting). >> >> The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a >> specific file structure (controllers, models, views) but still - neither >> of the 30+ tutorials I''ve browsed through tells me: >> - How many files exactly do I require for a simple "Hello World!"? >> > > You should google for tutorials on installing ruby and rails on your > computer and then how to create a rails project via the console using the > ''rails new'' command. This command creates an app structure and then probably > such a tutorial will show you how to render a page, or better, show you how > to create a simple CRUD model. > > So your steps are: > 1) Install ruby and rails locally > 2) Genearate a project: ''rails new myproject'' > 3) Create some content > 4) Deploy somewhere. I recommend you use Heroku as it will be the simplest > way for you to get something on the web. > > > > >> - What extensions should these files have? >> - Where to put which files? >> - What the hell should these files contain? >> >> Now, I can "play" with Ruby via the command line locally and I can just >> create an .rb file and run it from there, but that''s not the point, I >> want it to show online via a browser and as ridiculous as it sounds - I >> don''t know how to do that? >> >> Add. infos: >> - I''m trying to run it on a cheap shared web-hosting (Linux server). >> - Ruby on Rails + gems are installed there, can access them via the >> cPanel. >> - I''ve created a test-app through the cPanel - with success. >> - I''ve created a rewrite >> - I can access the subdomain via my browser and I''ll see the "Welcome >> aboard" start page. >> >> What now? >> >> I just can''t continue to learn the language via simple out-of-context >> examples via the command line while I have no idea where to upload which >> files to make it really function on-line :( >> >> Please help. >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jason Fleetwood-Boldt
2011-Sep-28 14:35 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
> Add. infos: > - I''m trying to run it on a cheap shared web-hosting (Linux server).That''s probably your problem -- most cheap shared web hosting services aren''t running a deployment stack for Rails.> - Ruby on Rails + gems are installed there, can access them via the > cPanel. > - I''ve created a test-app through the cPanel - with success. > - I''ve created a rewrite > - I can access the subdomain via my browser and I''ll see the "Welcome > aboard" start page.OK, maybe I''m wrong, perhaps your "cheap" shared web host does have a Rails deployment stack. Four tips for you to point you in the right direction: 1) try deleting the file public/index.html. That will make the "Welcome aboard" message go away. In its place you will get a nice "Route could not be found" error, so go check out your routes.rb file and let about how the Rails router works. 2) You can do all of this locally, you don''t need a web host, try starting Webrick ("rails server" in rails 3 or "script/server" in rails 2) and point your browser http://localhost:3000 3) Check out Phusion Passenger 4) When you''re actually ready to deploy an app for real, don''t mess around with your "cheap shared web-hosting" provider -- go to Heroku. It''s cheap, as-in basically free, for small low-traffic apps. -Jason On Sep 28, 2011, at 10:09 AM, -- -- wrote:> Hello Everyone, > > first off - I''m NOT a programmer. I know HTML/CSS very well and PHP > quite well, yet not I''m in need of a more "active" language and I''ve > decided to go with Ruby. > > Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers > the most basic question - what exactly do I have to upload to the server > to simply get a (any) response from Ruby (through a browser, using a > regular shared webhosting). > > The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a > specific file structure (controllers, models, views) but still - neither > of the 30+ tutorials I''ve browsed through tells me: > - How many files exactly do I require for a simple "Hello World!"? > - What extensions should these files have? > - Where to put which files? > - What the hell should these files contain? > > Now, I can "play" with Ruby via the command line locally and I can just > create an .rb file and run it from there, but that''s not the point, I > want it to show online via a browser and as ridiculous as it sounds - I > don''t know how to do that? > > Add. infos: > - I''m trying to run it on a cheap shared web-hosting (Linux server). > - Ruby on Rails + gems are installed there, can access them via the > cPanel. > - I''ve created a test-app through the cPanel - with success. > - I''ve created a rewrite > - I can access the subdomain via my browser and I''ll see the "Welcome > aboard" start page. > > What now? > > I just can''t continue to learn the language via simple out-of-context > examples via the command line while I have no idea where to upload which > files to make it really function on-line :( > > Please help. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Daniel Nachbar
2011-Sep-28 14:40 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
On Sep 28, 10:09 am, -- -- <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: ...> The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a > specific file structure (controllers, models, views) ...By the way, this is incorrect. You are confusing Ruby (the language) and Rails (the web framework). Ruby can be run as a stand-alone program directly via CGI or as code embedded within HTML (e.g. via erb). In contrast, Rails does have a specific file structure, etc. And, as mentioned in another reply, there are other Ruby-based web frameworks (e.g. Sinatra) that are worth looking into. Dan Nachbar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker
2011-Sep-28 15:05 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
-- -- wrote in post #1024089:> Hello Everyone, > > first off - I''m NOT a programmer. I know HTML/CSS very well and PHP > quite well, yet not I''m in need of a more "active" language and I''ve > decided to go with Ruby.How can you not be a programmer and know PHP quite well? That''s a contradiction. PHP is a programming language. If you know it then YES you are a programmer.> Thing is, I''ve been able to find ton of tutorials, but NOT ONE answers > the most basic question - what exactly do I have to upload to the server > to simply get a (any) response from Ruby (through a browser, using a > regular shared webhosting).Answer, you technically don''t have to upload anything to any server to get a Rails application to respond to a request through a web browser. Try this once you have Rails properly installed. (Doesn''t actually have to be Rails, you could do the same thing with Sinatra, or whatever Ruby based web framework you choose, but I''ll show Rails here): gem install rails .... .... rails new my_app cd my_app rails g[enerate] controller greetings index .... .... vim app/views/greetings/index.html.erb Delete all lines and add the following to the file ---- <p>Hello World</p> ---- :wq (to save file using vim) rails s[erver] Open web browser to: http://localhost:3000/greetings/index If your Ruby on Rails environment is setup correctly you should see "Hello World" in the web browser widow.> The closest "answer" I could find was that unlike HTML/PHP, Ruby needs a > specific file structure (controllers, models, views) but still - neitherYou are confusing a programming language with a web framework. PHP is a programming language just like Ruby. Rails is a web framework with it''s own structure, like CakePHP, and the many other web frameworks written in PHP with their own structures.> of the 30+ tutorials I''ve browsed through tells me: > - How many files exactly do I require for a simple "Hello World!"? > - What extensions should these files have? > - Where to put which files? > - What the hell should these files contain?You''re obviously looking in all the wrong places for information on how to get started with Rails. Try starting here: http://guides.rubyonrails.org/index.html> Now, I can "play" with Ruby via the command line locally and I can just > create an .rb file and run it from there, but that''s not the point, I > want it to show online via a browser and as ridiculous as it sounds - I > don''t know how to do that?Read my response above.> Add. infos: > - I''m trying to run it on a cheap shared web-hosting (Linux server). > - Ruby on Rails + gems are installed there, can access them via the > cPanel. > - I''ve created a test-app through the cPanel - with success. > - I''ve created a rewrite > - I can access the subdomain via my browser and I''ll see the "Welcome > aboard" start page.The most "drop dead simply" way to deploy Rails to a public web server is at Heroku: http://www.heroku.com/ Pricing begins at $0.00/month.> What now? > > I just can''t continue to learn the language via simple out-of-context > examples via the command line while I have no idea where to upload which > files to make it really function on-line :(I think I''ve adequately covered what you next step should be. Start reading the Rails Guides. They will tell you in simple terms how to get started and build a basic Rails app. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dave Aronson
2011-Sep-28 15:10 UTC
Re: Re: First time with Ruby - how to print "Hello World!" via web-server
On Wed, Sep 28, 2011 at 11:05, Robert Walker <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> How can you not be a programmer and know PHP quite well? That''s a > contradiction. PHP is a programming language. If you know it then YES > you are a programmer.I think what the OP means is that he''s not a *seasoned* programmer, with the kind of multi-language experience that makes it much easier to pick up another one. -Dave -- LOOKING FOR WORK, preferably Ruby on Rails, in NoVa/DC; see main web site. Main Web Site: davearonson.com Programming Blog: codosaur.us Excellence Blog: dare2xl.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
-- --
2011-Sep-28 15:48 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
Thanks, everyone. Seems I''ve missed "ruby.railstutorial.com", thanks for the tip, I''ll check it out. As for "cheap host" - it''s Hostnine.com. I''m referring to it as cheap because it''s just $7/month for a shared hosting plan, it''s not THAT bad. Of course I would not use this plan to run a popular high-traffic site, but then - IF I''d have one, then I''d start thinking about dedicated hosting (or rather - I''d think about it once I''d realize it''s starting to get big). Anyway, it''s good for my current needs. Still, thanks for the tip on Heroku. For now, I''d rather stay away from hosts offering completely free service ;) Next - yes, I''m probably confusing Ruby itself with the framework, thanks for clarifying. How can I not be a programmer and know PHP? It depends on the definition of "being a programmer". IMO, a programmer is someone who: 1. Knows many programming languages and often uses them because... he''s programming... a lot (probably for a living) ;) 2. Would never ask the questions I asked ;) I, on the other hand, happen to have an idea once in a while (if fact, lots of them, all the time, but once in a while there''s one that stick around "forcing" me to execute it) and the programming language is just a tool I need in order to make it work. It''s like driving a car (me) and being a car mechanic (a programmer). Although the driver CAN learn about the car''s basic mechanics and could fix some basic issues, he won''t be able to build a car just due to the lack of knowledge (and/or interest). When HTML wasn''t functional enough I needed some (a bit) PHP. I could actually make my idea work just with pure PHP, but it would result in the most user-UNfriendly experience ever and kind of... miss the whole point which is supposed to be an EASY way to... achieve something (can''t give you the details, sorry). So now I need something to make a website which will allow the user to: - return the results "live" without reloading the whole page and communicate with the MySQL database in the process, - drag and drop things, snap them to some positions... and again, communicate with the db in the process. Would PHP allow me to do that (with a PHP framework)? PHP has a framework? Is framework the part that allows a webpage to be dynamic? Or maybe I should use Perl/Python/Java I don''t really care. I''ve found lots of opinion that Ruby could do that and it''s apparently quite easy/easier than using other languages. Now, would you still consider me a programmer? I wouldn''t ;) OK then, off to the tutorial. Thanks again so far, let''s see where it gets me :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
-- --
2011-Sep-28 19:16 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
I watched the "Lesson 1: From zero to deploy" video from ruby.railstutorial.org and... where exactly does he say how to make just one simple "Hello world" line appear? I''ve learned things about git, Github and Heroku, but if you ask me where can I upload my simple one-liner manually via FTP to make it run - I still can''t tell you :( I can put a PHP file with <?php Print "Hello World!"; ?> in it to the public_html folder - works. Where to put which file to make it work with Ruby - still no clue. Still, knowing where the "Welcome aboard" page is, I''ll take a look at ERB and if I can put anything Ruby-ish <% here %>, it''ll already be a success... until we get to the part where I''d want Ruby to communicate with a database. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Allen A. Maxwell
2011-Sep-28 20:45 UTC
RE: Re: First time with Ruby - how to print "Hello World!" via web-server
The first tutorial lesson is basically a presentation of getting the environment and tools working, introduction to git and heroku and doing a rails deployment. He doesn''t do anything with hello world or attempt to hook anything else up in that section (at least not in the pdf and I don''t remember anything in the video).... In the second section he starts doing some trivial db stuff and continues the deployment to heroku and revision control on github. But no real hookup yet other than manually navigating to the pages... In the next section he starts putting more of it together, some static html, some TDD, some actions and other fun things... I''m just finishing that part of it now and moving to the next.. Hope this helps.... good luck! Max -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of -- -- Sent: Wednesday, September 28, 2011 1:16 PM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] Re: First time with Ruby - how to print "Hello World!" via web-server I watched the "Lesson 1: From zero to deploy" video from ruby.railstutorial.org and... where exactly does he say how to make just one simple "Hello world" line appear? I''ve learned things about git, Github and Heroku, but if you ask me where can I upload my simple one-liner manually via FTP to make it run - I still can''t tell you :( I can put a PHP file with <?php Print "Hello World!"; ?> in it to the public_html folder - works. Where to put which file to make it work with Ruby - still no clue. Still, knowing where the "Welcome aboard" page is, I''ll take a look at ERB and if I can put anything Ruby-ish <% here %>, it''ll already be a success... until we get to the part where I''d want Ruby to communicate with a database. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Daniel Nachbar
2011-Sep-29 00:13 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
On Sep 28, 3:16 pm, -- -- <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I watched the "Lesson 1: From zero to deploy" video from > ruby.railstutorial.org and... where exactly does he say how to make just > one simple "Hello world" line appear? > > I''ve learned things about git, Github and Heroku, but if you ask me > where can I upload my simple one-liner manually via FTP to make it run - > I still can''t tell you :(Perhaps this is more what you have in mind - # the following assumes some sort of *nix shell on your # local machine and Rails 3.1 rails new helloapp cd helloapp rails generate controller Pages hello echo ''<%= "Hello World!" %>'' >> app/views/pages/hello.html.erb # ftp the helloapp directory tree to your server # prod your server as necessary so that it recognizes # the newly uploaded files # point your browser at your_server/pages/hello # bask in the glory that is Hello World! PS - I happen to be in the process of preparing a "getting to ''hello world'' " screencast that shows this process for Rails via Passenger on a shared Debian configuration as provided by Dreamhost (Yet another discount hosting company that I happen to use and know well. I have no affiliation with Dreamhost other than being a happy customer.) If you (or anybody else interested for that matter) want to contact me off list, I''ll be happy to let you know when it is ready for beta viewing. Dan Nachbar dan-xldSq53ejqFBDgjK7y7TUQ@public.gmane.org -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker
2011-Sep-29 15:08 UTC
Re: First time with Ruby - how to print "Hello World!" via web-server
-- -- wrote in post #1024115:> How can I not be a programmer and know PHP? It depends on the definition > of "being a programmer". IMO, a programmer is someone who: > 1. Knows many programming languages and often uses them because... he''s > programming... a lot (probably for a living) ;) > 2. Would never ask the questions I asked ;)I hope you realize I was mostly kidding about that. I know what you meant, it just seemed funny to me that you first said "I''m not a programmer" then said "I know PHP quite well" -- paraphrased.> Now, would you still consider me a programmer? I wouldn''t ;)I consider a person to be a programmer once they write their first program. Even if that happens to be: puts "Hello World". Everything beyond that is the person''s level of experience as a programmer. You have shown interest in programming, and you have written at least some PHP code. Congrats, you are a programmer. I don''t see that there is some "magical" level of experience where suddenly a person transforms into a programmer. I''ve been programming for a really long time and I still learn something new on a nearly daily basis. -- from a separate followup post by the OP> I can put a PHP file with <?php Print "Hello World!"; ?> in it to the > public_html folder - works. Where to put which file to make it work with > Ruby - still no clue.Okay, here is a REALLY important point you''re not taking into consideration. The reason that snippet of PHP works, in what appears to be some magical transparent way, is that there is a complex and sophisticated module, written in C, that was included into the web server (Apache, IIS, or whatever) by your shared hosting provider. This "special" module knows how to interpret the <?php> tags and transform them into plain old HTML before delivering the response to the client web browser. Rails by contrast takes a different approach. In a Rails application there may be a small module (in the case of something like Phusion Passenger) or simply some web server configuration that is responsible for directing requests to the application from the web server. The point I''m making here is that the vast majority of the work that would be performed by the PHP web server module is actually deferred to the Rails application itself. Hence the Rails routing system that directs requests to the proper Rails controller classes, which in turn are responsible for rending eRB templates into HTML and delivering the response to the client browser. You''re trying to directly compare two completely different approaches to web applications where such a direct comparison simply isn''t possible. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.