Book about Ruby on Rails with Apache2? [closed] - ruby-on-rails

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I used to use the Webrick server for Ruby on Rails, but now my boss asked me to run the ROR code on apache server, I see there are some difference between these two servers, and I don't know how to access the controller/action on apache, so anyone happens to know any book about ROR on apahce? Thx!

To run directly in Apache, your best bet is to use Phusion Passenger, which can act as an Apache module.
However, I think you're missing a bit of conceptual information as well. Here's some of the common Rack servers used to host rails:
WEBrick: A web server implemented purely in Ruby (that ships with Ruby). It is not very performant, and is relatively limited. It makes for a great development webserver, but most people don't use it in production.
Thin: A very performant evented web server that is particularly easy to get up and running.
Unicorn: A forking web server that is widely used and recommended (written by GitHub) - but requires a bit more management to get up and running in production.
In nearly all cases, however, people generally have Nginx or Apache in front of their Rails webserver of choice (as a proxy):
Nginx/Apache do a much better job of serving static files than any of the options above. If you are not using a CDN to host your assets, you should definitely configure the proxy to host them.
Nginx/Apache are great at managing large volumes of requests and queueing them so that your app server can focus on in-flight requests rather than a deluge of queued-up requests.
Less surface area for security vulnerabilities.
My configuration of choice is Nginx+Unicorn; I find Apache too unwieldy to administrate, and Unicorn is particularly great.

Related

On which servers can i deploy Ruby on Rails? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Im a beginner in Ruby on Rails and i asked me on which servers i can deploy the framework!
I heard a lot about Heroku, but they was asking me if i can start a ruby on rails application with a database of 4000-10000 entries (i mean little traffic!) on a local server for example from the german company protonet here is the link:
http://protonet.info
Or on an simple windows,linux server? With an Xeon Processor?
Or can somebody suggest a solution for a local server without binding to the internet? the website itself only needs to be visible in the local network!
I thank you a lot!
Yes, you can deploy locally. First thing you'll want to try is 'rails s -p 3000'. Bingo. You now have a fully functional rails server working on your local network. Try accessing it with your ip address and the port. You can deploy on both Windows and Linux, but based on my own experience, you'll prefer Linux (faster and easier).
Windows, with Thin server as a service : http://www.dixis.com/?p=140
Linux : Ideal Rails Server
In general any Unix(y) or Windows server (not recommended) should do it. Most shared hosting companies don't suport ruby so a VPS might be in order for public internet. I deploy always on Ubuntu and just moved to digitalocean.com ($5 / month for a basic VPS) - not endorsing as just moved last week. For internal, I'd suggest a Unix server and possibly rvm for having dedicated ruby install for app.
Heroku / Engine Yard also options.

Web server options for Ruby 2.0? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I wanted to know which is the best web server to use with heroku running ruby 2.0.
I'm currently running puma but cannot take full advantage of it without rubinius or jruby. I don't want to change my interpreter from ruby 2.0 native.
My goal is to have a web server that scales efficiently as I scale up my heroku dynos.. Thus, helping me serve as many concurrent users as possible.
The first part of the decision is if your application is considered thread safe.
Out of the box Rails < 4.0 is not! If you want it to work on multiple requests at the same time, you need a server that is capable of forking. Most prominent example: Unicorn. Heroku suggests that for Rails apps.
However, if your app is not limiting itself to one thread:
I suggest to use puma. It does support multiple threads on a single dyno. Even with MRI.
As said on pumas official website it uses significantly less memory than unicorn.
I honestly don't know what you mean by "cannot take full advantage". The only problem you might run into is, independent of the platform it runs on, that your application is thread safe.
My goal is to have a web server that scales efficiently as I scale up my heroku dynos.. Thus, helping me serve as many concurrent users as possible.
Once you spin up multiple dynos, the webservers will be started on each dyno independent of each other. I don't see any special needs for this scenario.

Deploying rails after Getting Started guide [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm new to Ruby on Rails, and I just finished following the getting started guide at http://guides.rubyonrails.org/getting_started.html. In the guide I ran the development server on http://localhost:3000. Now I just moved the project folder to the directory of my website, but I cannot access the pages of the project by entering a URL. What steps do I need to do?
You will need to host your Rails application on a server that has Rails installed. Then you will need to make sure that you start whatever web server you are running on that web server so that it can start accepting requests.
If you haven't already done it, I would suggest that you find a Rails-friendly web host that will handle the server configuration for you.
Suppose your web server is Apache 2, you can use Phusion Passenger.
See, Rails comes with its own little web server called Webrick, that isn't really suitable for production for various reasons. So when you run rails server you start that server.
You need to tell your server (e.g. Apache 2) what pages to process via your application, and how. And Passenger makes that very easy.
The best guide to rails deployment is covered in chapter one of the rails tutorial book. It covers, source code version control as well as setting up the environment for deployment. Here is the link to chapter one: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#top
Hope this helps.

Best hosting for Ruby on Rails (as of 2012) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was wondering what people think is currently the best host for Ruby on Rails. I found some older posts on here on the subject but I wanted to know what the current agreement is. Shared hosting is ok for now but I would like an option from dedicated hosting later.
Thanks!
Even though some will complain, Heroku is still the best in my mind. Super easy to set up, super easy to scale. You can deploy to Heroku in all of 2 minutes. Best of all, it's free with basic usage.
Another thing I like about Heroku is that it has an unparalleled community using it, which means a lot of support on StackOverflow (https://stackoverflow.com/questions/tagged/heroku).
If you need to know what ratio of web/worker dynos you'd need, look here:
Heroku: web dyno vs. worker dyno? How many/what ratio do I need?
Although keep this in mind: it will be a while until you need to scale. As 37signals says, deal with scaling when you have that problem.
If you're looking for more flexibility, Amazon EC2 is always a good option. You pay only for what you use, which is always nice.
Linode is still decent, and fairly cheap too.
I think the best choice is AWS or Heroku
It all depends on what you are building and how you are building it. If you app is pretty straight forward rails app and you are not doing anything special on the system level (lets say working with transcribing video in a way that heroku add-ons would support it) than heroku is probably one of the fastest way to get started an move along. If you are are building something on the system level where you app needs to have access to anything on the system you probably better off going with linode or AWS route, It also depends alot about the level of control/responsibility your are looking for.
THere is also survey being done right now about this very topic, they havent published the 2012 results but 2009 are available:
http://rails-hosting.com/Results/SurveySummary.html

What are the WordPress alternatives for Ruby on Rails? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What are the WordPress alternatives for Ruby on Rails? How do they compare to WordPress?
Refinery looks really simple but I don't have an in depth comparison to WordPress. Looks like it has a lot less features but likely easier to maintain and extend upon. It's pretty standard to write really crappy code in the WordPress community.
I've been using WordPress more or less against my will for about two four years now (since I started using other frameworks (I've started to really love WP again)). I think there is no "good Rails alternative". Of course there are a lot of blog engines but none have as many plugins available or are as well known with clients. Let's be honest, WP has a fantastic front-end, clients seem to like that. The reason "we developers" look for Rails alternatives is obviously because Rails developer aren't comfortable with WP. But there's no platform out there that has the same out-of-the-box completeness and user friendliness as WP. For blog-like purposes that is of course.
Publify can be a answer, but I'm not able to compare with WordPress.
You may want to look into Wordscript ; it includes API's written in Ruby and PHP that connects to existing WordPress databases and returns json structures (made from generated SQL).
Useful if you want to keep full administrative features of WordPress, and have a somewhat simple WordPress site. Neither version requires WordPress to be installed locally, but you can't really do anything administrative with the api or comments/custom fields (yet). Also the API is much faster and consumes a fraction of the resources WordPress would.

Resources