Reputation:
I'm a complete apple newbie coming from a LAMP+windows setup trying to figure out how ruby and apple works.
So I just executed "gem server" and i have this server running on localhost:8808 now, great -- it works.
BUT Anyone know where the heck is my root directory ie. the equivalent of htdocs? I can't find it, damnit.
cheers...
Upvotes: 0
Views: 1522
Reputation: 60089
If you are going to use Ruby for Web development, the most widely-used framework for that purpose is Ruby on Rails (usually referred to as just "Rails"). It is distributed as a Ruby "gem."
On your OS X command line (use the OS X application called "Terminal"):
$ sudo gem install rails
Now you're ready to build your superior FaceBook clone.
$ rails enhancedfacebook
You were asking about Web servers. cd into your project dir...
$ cd enhancedfacebook
And start the Web server that comes with Rails...
$ script/server
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Now your application is running on your local machine here:
For the production server, you'd use a different, more robust setup (probably Apache with mod_rails, AKA "Passenger"), but for viewing your app as you work on it, this is what you'd use.
Upvotes: 1
Reputation: 241
I think you are mixing things up. I assume from your question that you think gem server is a webserver like apache/IIS.
Gem server is a stand alone web frontend to display all the locally installed gems and documentation.
Ruby is a general-purpose programming language, if you want to do web stuff in ruby (you mentioned LAMP). I suggest you check out the following web frameworks:
Upvotes: 2
Reputation: 7356
I think you want /Library/Ruby/Gems/1.8
and then doc/
or gems/
.
Upvotes: 1