I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this. I haven't really done anything w/
web-development in many years, and back then i was using php. I know
that ruby on rails is the hottest thing ever right now, but it doesn't
seem like i should need database-centric stuff like that for the
simple web-apps i need to develop. I found mod-ruby and have set it
up, but i'm not sure how to best use it now. Is there any
documentation avaliable? do i just use puts to output html streams,
or is that streamlined for me somehow? How do i ask for input, etc.?
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this. I haven't really done anything w/
web-development in many years, and back then i was using php. I know
that ruby on rails is the hottest thing ever right now, but it doesn't
seem like i should need database-centric stuff like that for the
simple web-apps i need to develop. I found mod-ruby and have set it
up, but i'm not sure how to best use it now. Is there any
documentation avaliable? do i just use puts to output html streams,
or is that streamlined for me somehow? How do i ask for input, etc.?
I'd point out that RoR does not need a DB. You can make your own
Models, or just put all your logic inside controllers. I've done that
for a couple of one-off projects. Works fine.
Ed
···
On 11/18/05, Cam <cameron.matheson@gmail.com> wrote:
Hi guys,
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this. I haven't really done anything w/
web-development in many years, and back then i was using php. I know
that ruby on rails is the hottest thing ever right now, but it doesn't
seem like i should need database-centric stuff like that for the
simple web-apps i need to develop. I found mod-ruby and have set it
up, but i'm not sure how to best use it now. Is there any
documentation avaliable? do i just use puts to output html streams,
or is that streamlined for me somehow? How do i ask for input, etc.?
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this. I haven't really done anything w/
web-development in many years, and back then i was using php. I know
that ruby on rails is the hottest thing ever right now, but it doesn't
seem like i should need database-centric stuff like that for the
simple web-apps i need to develop. I found mod-ruby and have set it
up, but i'm not sure how to best use it now. Is there any
documentation avaliable? do i just use puts to output html streams,
or is that streamlined for me somehow? How do i ask for input, etc.?
Coming from php, you might find eruby nice. It uses files of
extension .rhtml, and allows you to embed ruby code inside an
html page, a la php or asp.
Combining eruby for the template side, and the CGI module for
additional HTML generation and form processing, should be
a nice, simple solution to providing browser access to system
utilities.
HTH,
Tim Hammerquist
···
Cam <cameron.matheson@gmail.com> wrote:
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc).
I'd like to use ruby for this. I haven't really done anything
w/ web-development in many years, and back then i was using
php. I know that ruby on rails is the hottest thing ever
right now, but it doesn't seem like i should need
database-centric stuff like that for the simple web-apps
i need to develop. I found mod-ruby and have set it up, but
i'm not sure how to best use it now. Is there any
documentation avaliable?
do i just use puts to output html streams, or is that
streamlined for me somehow? How do i ask for input, etc.?
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this.
I too am unable to find any documentation or help for building wep apps
(*outside* of rails). I am confused between mod_ruby, cgi, fcgi,
ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
I did get a simple cgi program to run off apache (unmodified), but when
i added "require 'cgi' it threw a 500 internal error. I have installed
rails, but first wish to do some *non-db* stuff outside of it. Just
apache or lighttpd.
gee don't know how i never noticed that before... thanks!
Cameron Matheson
···
On 11/18/05, Justin Collins <collinsj@seattleu.edu> wrote:
Cam wrote:
> Hi guys,
>
> I need to make some simple web-pages at work for internal use
> (changing svn password, modifying postfix email-aliases, etc). I'd
> like to use ruby for this. I haven't really done anything w/
> web-development in many years, and back then i was using php. I know
> that ruby on rails is the hottest thing ever right now, but it doesn't
> seem like i should need database-centric stuff like that for the
> simple web-apps i need to develop. I found mod-ruby and have set it
> up, but i'm not sure how to best use it now. Is there any
> documentation avaliable? do i just use puts to output html streams,
> or is that streamlined for me somehow? How do i ask for input, etc.?
>
> Thanks,
> Cameron Matheson
> http://ruby-doc.org/core/classes/CGI.html
The CGI class with the HTML extensions will take care of all the HTML
output. For example:
require 'cgi'
cgi = Cgi.new('html4')
cgi.out {
cgi.html {
cgi.body {
"Hello!"
}
}
}
It has functions for nearly all HTML tags/forms/session/cookie stuff.
On 11/18/05, Ed Howland <ed.howland@gmail.com> wrote:
I'd point out that RoR does not need a DB. You can make your own
Models, or just put all your logic inside controllers. I've done that
for a couple of one-off projects. Works fine.
cool, i haven't paid a whole lot of attention to rails (like i had
said i hadn't been doing any sort of web-development before), but i
was under the impression that it was just for stream-lining
webapps/database/lard. I'll have to give it another look,
Although eruby might familiar (and thus an ideal tool for these
particlar tasks), I'd recommend eventually learning the basics of RoR
as its MVC architecture encourages better style than PHP does most of
the time. It doesn't need a database, and while ActiveRecord (its ORM)
is a big part of Rails, its use is by no means mandatory. And in time
you'll probably need to use its other abilities (such as sending
emails or providing web services).
Jacob
···
On 11/19/05, Tim Hammerquist <penryu@vegeta.ath.cx> wrote:
Cam <cameron.matheson@gmail.com> wrote:
> I need to make some simple web-pages at work for internal use
> (changing svn password, modifying postfix email-aliases, etc).
> I'd like to use ruby for this. I haven't really done anything
> w/ web-development in many years, and back then i was using
> php. I know that ruby on rails is the hottest thing ever
> right now, but it doesn't seem like i should need
> database-centric stuff like that for the simple web-apps
> i need to develop. I found mod-ruby and have set it up, but
> i'm not sure how to best use it now. Is there any
> documentation avaliable?
> do i just use puts to output html streams, or is that
> streamlined for me somehow? How do i ask for input, etc.?
Coming from php, you might find eruby nice. It uses files of
extension .rhtml, and allows you to embed ruby code inside an
html page, a la php or asp.
Combining eruby for the template side, and the CGI module for
additional HTML generation and form processing, should be
a nice, simple solution to providing browser access to system
utilities.
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this.
I too am unable to find any documentation or help for building wep apps (*outside* of rails). I am confused between mod_ruby, cgi, fcgi, ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
Consider IOWA or Narf or Og/Nitro. Or their libraries.
I've come up against the lack of tutorials for such a thing as well. But recently I've made good progress getting mod_ruby and eRuby working together to produce a lightweight web environment much like PHP (where I came to Ruby from). Althought I understand mod_ruby has some speed issues.
However, get, post, and cookies are still a bit of a headache. I'm hoping to make some progress on that shortly.
-Mat
···
On Jun 7, 2006, at 12:30 AM, rahul benegal wrote:
cameron.matheson wrote:
Hi guys,
I need to make some simple web-pages at work for internal use
(changing svn password, modifying postfix email-aliases, etc). I'd
like to use ruby for this.
I too am unable to find any documentation or help for building wep apps
(*outside* of rails). I am confused between mod_ruby, cgi, fcgi,
ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
I did get a simple cgi program to run off apache (unmodified), but when
i added "require 'cgi' it threw a 500 internal error. I have installed
rails, but first wish to do some *non-db* stuff outside of it. Just
apache or lighttpd.
I'd point out that RoR does not need a DB. You can make your own
Models, or just put all your logic inside controllers. I've done that
for a couple of one-off projects. Works fine.
cool, i haven't paid a whole lot of attention to rails (like i had
said i hadn't been doing any sort of web-development before), but i
was under the impression that it was just for stream-lining
webapps/database/lard. I'll have to give it another look,
I've found Nitro much simpler to work with than Rails in many cases, particularly when starting off with no database and then, if needed, easing into the use of one. It's very natural.
James
···
On 11/18/05, Ed Howland <ed.howland@gmail.com> wrote:
I've used Rails so much, that now I just install Rails, and use it
without a database. I really like the whole environment and since I
am used to it (testing, webrick while designing, etc.) it works really
well. Just a suggestion. Good luck.
···
On 6/7/06, Mat Schaffer <schapht@gmail.com> wrote:
On Jun 7, 2006, at 12:30 AM, rahul benegal wrote:
> cameron.matheson wrote:
>> Hi guys,
>>
>> I need to make some simple web-pages at work for internal use
>> (changing svn password, modifying postfix email-aliases, etc). I'd
>> like to use ruby for this.
>
> I too am unable to find any documentation or help for building wep
> apps
> (*outside* of rails). I am confused between mod_ruby, cgi, fcgi,
> ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
>
> I did get a simple cgi program to run off apache (unmodified), but
> when
> i added "require 'cgi' it threw a 500 internal error. I have installed
> rails, but first wish to do some *non-db* stuff outside of it. Just
> apache or lighttpd.
I've come up against the lack of tutorials for such a thing as well.
But recently I've made good progress getting mod_ruby and eRuby
working together to produce a lightweight web environment much like
PHP (where I came to Ruby from). Althought I understand mod_ruby
has some speed issues.
However, get, post, and cookies are still a bit of a headache. I'm
hoping to make some progress on that shortly.
-Mat
I'd point out that RoR does not need a DB. You can make your own
Models, or just put all your logic inside controllers. I've done that
for a couple of one-off projects. Works fine.
cool, i haven't paid a whole lot of attention to rails (like i had
said i hadn't been doing any sort of web-development before), but i
was under the impression that it was just for stream-lining
webapps/database/lard. I'll have to give it another look,
Alternatively, you could just go camping. Camping is fun.
I've come up against the lack of tutorials for such a thing as well.
But recently I've made good progress getting mod_ruby and eRuby
working together to produce a lightweight web environment much like
PHP (where I came to Ruby from).
How do you make progress if there is no documentation? What is the key
to your progress?
"James Britt" <james_b@neurogami.com> wrote in message
I've found Nitro much simpler to work with than Rails in many cases,
particularly when starting off with no database and then, if needed,
easing into the use of one. It's very natural.
That sounds like a big plus (over Rails). How does one go about doing this?
And do the various relational macros carry over pretty well?
I've considered this option as well and I kinda like it. My main drive for creating a PHP-like Ruby web environment is evangelism, I think. Lowering the barrier to entry so that (so long as it's installed on the server) all a user has to do to start coding is open a .rhtml file. That and possibly pairing it with a PHP->Ruby translation package to get my old apps working in Ruby (albeit, ugly Ruby).
Hopefully I'm not grossing out anyone too much here, but _I_ think it's worthwhile.
-Mat
···
On Jun 7, 2006, at 9:51 AM, Asenchi wrote:
On 6/7/06, Mat Schaffer <schapht@gmail.com> wrote:
On Jun 7, 2006, at 12:30 AM, rahul benegal wrote:
> cameron.matheson wrote:
>> Hi guys,
>>
>> I need to make some simple web-pages at work for internal use
>> (changing svn password, modifying postfix email-aliases, etc). I'd
>> like to use ruby for this.
>
> I too am unable to find any documentation or help for building wep
> apps
> (*outside* of rails). I am confused between mod_ruby, cgi, fcgi,
> ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
>
> I did get a simple cgi program to run off apache (unmodified), but
> when
> i added "require 'cgi' it threw a 500 internal error. I have installed
> rails, but first wish to do some *non-db* stuff outside of it. Just
> apache or lighttpd.
I've come up against the lack of tutorials for such a thing as well.
But recently I've made good progress getting mod_ruby and eRuby
working together to produce a lightweight web environment much like
PHP (where I came to Ruby from). Althought I understand mod_ruby
has some speed issues.
However, get, post, and cookies are still a bit of a headache. I'm
hoping to make some progress on that shortly.
-Mat
I've used Rails so much, that now I just install Rails, and use it
without a database. I really like the whole environment and since I
am used to it (testing, webrick while designing, etc.) it works really
well. Just a suggestion. Good luck.
I've been shipping and supporting commercial applications in
Ruby-without-Rails for three years now. There are tutorials out there for
getting eruby and mod_ruby to work with Apache. Also, if you read the
documentation for Ruby CGI modules and classes, that's a big head start.
Performance can be a problem, but it's vastly better than Rails at any rate.
And some newer approaches are starting to emerge as well.
···
On 6/15/06, anne001 <anne@wjh.harvard.edu> wrote:
> I've come up against the lack of tutorials for such a thing as well.
> But recently I've made good progress getting mod_ruby and eRuby
> working together to produce a lightweight web environment much like
> PHP (where I came to Ruby from).
How do you make progress if there is no documentation? What is the key
to your progress?
> I've found Nitro much simpler to work with than Rails in many cases,
> particularly when starting off with no database and then, if needed,
> easing into the use of one. It's very natural.
That sounds like a big plus (over Rails). How does one go about doing this?
And do the various relational macros carry over pretty well?
very easy:
$ gem install nitro
$ cd mydir
$ mkdir public
$ vi run.rb
include 'nitro'
Nitro.run
$ cd public
$ vi index.xhtml
<b>hello world</b>
$ cd ..
$ ruby run.rb
and browse localhost:9999
to make this dynamic:
$ vi public/index.xhtml
<b>hello world, the time is #{Time.now}</b>
and refresh your browser
From there, you can start adding pretty much everything, from ORM, to
ajax, to webservices, you name it. Nitro provides everything you need.
For more details check out www.nitrohq.com, or join the mailing list...
That sounds like a terrific project, well worth pursuing.
And I am /delighted/ to hear that there are aspects of
Rails I can use without a database (thanks, Asenchi).
Thinking I had to install a database is one of the things
that has kept me from taking a look at Rails...
Mat Schaffer wrote:
···
On Jun 7, 2006, at 9:51 AM, Asenchi wrote:
On 6/7/06, Mat Schaffer <schapht@gmail.com> wrote:
On Jun 7, 2006, at 12:30 AM, rahul benegal wrote:
> cameron.matheson wrote:
>> Hi guys,
>>
>> I need to make some simple web-pages at work for internal use
>> (changing svn password, modifying postfix email-aliases, etc). I'd
>> like to use ruby for this.
>
> I too am unable to find any documentation or help for building wep
> apps
> (*outside* of rails). I am confused between mod_ruby, cgi, fcgi,
> ruby-web, ruby-fcgi etc. <b>Is there a simple tutorial?</b>
>
> I did get a simple cgi program to run off apache (unmodified), but
> when
> i added "require 'cgi' it threw a 500 internal error. I have installed
> rails, but first wish to do some *non-db* stuff outside of it. Just
> apache or lighttpd.
I've come up against the lack of tutorials for such a thing as well.
But recently I've made good progress getting mod_ruby and eRuby
working together to produce a lightweight web environment much like
PHP (where I came to Ruby from). Althought I understand mod_ruby
has some speed issues.
However, get, post, and cookies are still a bit of a headache. I'm
hoping to make some progress on that shortly.
-Mat
I've used Rails so much, that now I just install Rails, and use it
without a database. I really like the whole environment and since I
am used to it (testing, webrick while designing, etc.) it works really
well. Just a suggestion. Good luck.
I've considered this option as well and I kinda like it. My main drive for creating a PHP-like Ruby web environment is evangelism, I think. Lowering the barrier to entry so that (so long as it's installed on the server) all a user has to do to start coding is open a .rhtml file. That and possibly pairing it with a PHP->Ruby translation package to get my old apps working in Ruby (albeit, ugly Ruby).
Hopefully I'm not grossing out anyone too much here, but _I_ think it's worthwhile.
-Mat