starter ruby - my first ruby site [closed] - ruby-on-rails

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am looking to make my first ruby - based website.
I am assuming looking at tutorials that print "hello" should work, but it does not.
Any pointers? I am assuming this is a silly noob question.
my file is located on mysite.com/test.rb
thanks!
(this is more of a dummy starter question than coding, so it is here rather than stack).

Have a look at Sinatra. You can get a hello world site up in 5 lines of code, and then start checking out tutorials from there.

Check out Ruby on Rails resource http://ruby.railstutorial.org/ruby-on-rails-tutorial-book. It is very easy to start learning.

If your file only contains the following
print "hello"
then it most certainly wont just work by browsing to site.com/foo.rb
You need things setup like a webserver to handle the request and route it to a ruby interpreter, etc...

Related

Ruby on Rails Events Application [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am relatively new to Ruby on Rails. I have built few sample apps but now I want to build a real world app like an events website which gives information on forthcoming events, event galleries, etc. Can some one give more ideas on this or something already built on github to learn using it.
Thanks in advance.
By the types of question you are asking, it seems to me that you are not very experience in Rails. Therefore, I recommend you to complete Michael Hartl's tutorial: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book. Although it won't teach how to make galleries and such, it will teach you the fundamentals that you need for your app. For instance, in your case you will understand how to create an Event model with information in a database that you can then show. After that, you can go ahead and check out things like spud_photos( https://github.com/gregawoods/spud_photos) which is a gem that allows you to create image galleries.
Good luck

Re-Write url? Syntax? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was working on a website for a client. I wanted to re-write a url but don't know how to go about it. I have very less time. I am looking for a tutorial, but would be quite helpful if someone could help me.
Following is the url that I receive:
www.example.com/shop/url_encoded_category_name/product?productid=
I want to re-write it to:
www.example.com/shop-public-home.php?productid=
The problem here is that "url_encoded_category_name" will be some text and will be something different every time.
I am looking for a quick tutorial, and will close the question if I found a solution.
I am highly thankful for any help you can provide.
Jehanzeb k. Malik
You will probably use apache mod_rewrite, if you use an apache http server. All apache modules have excellent documentation including good examples. You will find all details you are looking for in that documentation: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
You can either setup the rewriting rules in the central server configuration (preferred way) or decentralized using so called ".htaccess" files. You can use more or less the same rules for both approaches. Check the RewriteEngine, RewriteRule, RewriteMap and RewriteCond commands.

How do I create a Wiki using Ruby on Rails? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I was recently given a task to create a blog using Ruby on Rails. So I found a very helpful guide, which was very helpful for the blog. However, there seems to be a short supply of good Ruby-on-Rails guides on creating a wiki that is, up to date, makes sense and accurate.
You can check existing gems for wikis: https://www.ruby-toolbox.com/categories/wiki_apps
There are 3 rails-based wikis.
The most active is https://github.com/alno/irwi.
Other two, https://github.com/queso/signal-wiki and https://github.com/AndyMoreland/kii, was not updated for years, but still you can try to look through sources to get the base idea

Data mining RoR-app for dribbble-shots [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to data mine dribbble.com so I can make an app that registers when the best time is to upload a shot to dribbble is. I've seen someone do it for stories on news.ycombinator.com/ (Hacker News): http://hnpickup.appspot.com/.
I don't really know where to start since I'm still fairly new to RoR. I hope you can give me some pointers.
I'd like to run the app on Heroku, if that matters.
Michael Hartl's tutorial is a good place to start for this task. The internal logic would need to change to be yours but I think that is down the road a bit. As for charting there is FusionCharts and HighCharts to name a couple of options I am familiar with.
I ended up using Heroku scheduler to scrape dribbble, using their own API.

How Ruby on Rails work [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I programmed in php. And when you use some framework, then, as far as php is intepreter, all the framework loads every request. But not rails, though, ruby is interperter too... So, how does it work
Nope. Rails as the framework caches all loaded modules, class and libraries on the first several requests (it's not on the first request only since it also has lazy load for above things).
But by default under development mode, all app modules (mvc) are reloaded on each request. Libraries (plugins, gems, etc) are not reloaded.
Your question is hugely wide open and too large to really answer effectively. This is a good place: RoR Guides. If after reading that you have more specific and directed questions bring them back and we'll try our best to help you...

Resources