Kind of a silly question, but, as someone learning Rails (after mucking around in PHP for several years), with the intent of building some serious apps but also doing content management, I'm curious what a simple content-managed site like that one runs on.
BuiltWith Technology Profiler Extension for Chrome will show you... I use this plugin all the time to answer similar questions of curiousity.
ruby.railstutorial.org
Varnish
Varnish is a web accelerator / reverse proxy caching server.
nginx
nginx [engine x] is a HTTP server and mail proxy server written by Igor Sysoev.
Frameworks
Ruby on Rails Token
Ruby on Rails is an open-source web framework that is optimized for programmer happiness and sustainable productivity. Note that Ruby on Rails has two detection techniques and this is one of them.
Ruby on Rails
Ruby on Rails is an open-source web framework that is optimized for programmer happiness and sustainable productivity.
The Ruby on Rails Tutorial website is a Rails 2.3 app running on Heroku. (At some point I plan to upgrade it to Rails 3, but this isn't currently a priority.) Because the content is largely static, most pages are cached using Heroku's Varnish HTTP cache.
Related
I have a Ruby on Rails powered website running on www.myapp.com.
Now my boss asked me to add a blog to that website. The number of blog articles is expected to grow strongly over the next few years, possibly into the hundreds or even thousands.
The problem: Our Rails app is not suited for content production or blogging at all!
My boss has a PHP / XML powered software in mind that he wants me to install for the purpose of running the blog. But the software has nothing in common with Ruby on Rails and cannot be combined with it.
Now we figured that setting up the blog under a subdomain like blog.myapp.com would be feasible. However, according to various sources this may come at the price of less search engine visibility when compared with running the blog in a subdirectory of our website such as www.myapp.com/blog/ which would be our favourite solution.
So to cut a long story short, is there a way to establish a PHP blog in a subdirectory of a Rails 5 app? If so, how?
Thanks for any pointers.
You'd configure this in your frontend web server (Apache, nginx, etc.). Normally, you pass all requests to your domain to your Rack server (Unicorn, Puma, etc.). Instead, you want to treat /blog as your PHP app - configuring all URLs with that path to run your PHP, and pass all other URLs to your upstream Rack server as you would for any other Rails app. Specifics on how to implement this would depend on what frontend web server you're using.
Best practice for Scalable project on ruby on rails. Problem: I don't understand the difference between web and app server in ror projects.
I understood that the differences between application and web servers are webserver handles requests and application has business logic. However I don't quite understand how I can implement it in my ruby on rails application.
So, I have, for example, two instances and ruby on rails application.
On the first server I want to set up a web server, and on the second one I want to install application server.
But, for example, I use passengers as my webserver that makes easier to deploy my ror application. So, will I have any benefits implementing such logic? Can I use passenger as an cache server or something like this? Is it possible to put passenger on another server and send request to ror application? Or I totally wrong and don't understand the conception?
Note: I just found amazon web application hosting architecture and now I'm trying to figure out how I can it implement and how it could work.
Use heroku with puma. That's the easiest to setup.
http://www.justinweiss.com/articles/a-web-server-vs-an-app-server/
https://www.nateberkopec.com/2015/07/29/scaling-ruby-apps-to-1000-rpm.html
https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
I'm trying to use Brunch with Rails and Ember.js with Separation of Frontend and Backend then use Node.js and Socket.io for real time updates.
I think this tutorial Adding Real-Time to Rails With Socket.IO, Node.js and Backbone.js
is useful and explains how Rails, Socket.io, Node.js and Backbone.js can be implemented but how would we go about adding Brunch and Ember.js with database integration?
Do we have any suggestions? or are there good tutorial/example out there that we could make use of?
O. Community, and thanks in advance for the support!
I recently took Mattan Griffel's One Month Rails course on skillshare to be able to write rails web apps.
Railsinstaller.org includes rails 3.2.1 and ruby 1.9.3 and works perfectly out of the box.
My app worked well and it was time to get it up on the web, so I purchased a namecheap domain and webserver, uploaded my app and... nothing!
The problem is that the namecheap servers only support rails 2.3.17 and ruby 1.8.7 - nothing created with v 3.x or dependent on ruby 1.9.x will run in a 2.x / 1.8.x environment.
Has anyone else run into this issue?
It seems like such a standard use case, I can't believe it's not better documented on the namecheap site.
I've done my Google-Fu and have learned that, once I installed it, I could create an older rails app using
rails _2.3.17_ AppName
Is there a similar way of forcing rails to use an older version of ruby as well?
I'm close to cancelling my namecheap account altogether in disgust, so if someone out there knows of a better place to host my rails 3.x web apps, I'd love to hear about it!
(Let's assume, for the time being, that a VPS is prohibitively expensive and far in excess of what I need, resource-wise).
Thanks again,
One Frustrated User
You can use heroku free account to begin with. Don't waste time on fixing problems on shared hostings, they are just toys.
Rails 3.x native cPanel support is still unreleased , feature request case is still open
http://forums.cpanel.net/f145/mod_rails-passenger-instead-mongrel-rails-3-support-case-44197-a-152577.html
This is tricky but possible to run Ruby 3 applications - additional software installation and global server reconfiguration required in this case, but hardly possible on regular shared server per user. We can offer to upgrade your hosting account to VPS. All your existing account content including databases, additional domains, email accounts and settings will be transferred transparently to VPS. To optimize your VPS with cPanel and make possible for you to develop and run Ruby 3 application you may request our technical support team to tune up the system according to all your requirements. Operating system tuning and custom software installation is included with Full Management VPS option. You may request part-time technical support as an alternative.
Regards,
Dima S.
Technical Support,
Namecheap Hosting
I am part of a team that manages a public facing cloud platform at my company. We have a large user base running VM's that face the internet. I would like to run an automated scan of our address space and see if anyone is running a Rails app so I can notify them to upgrade their version of Rails to avoid a critical security vulnerability that came out this week.
I've noticed that in some Apache deployments, there is a Passenger Header that is useful:
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.0.3
However, this is not reliable. I'm wondering if there is a reliable way to detect Rails running behind a web server either with response headers or some kind of a GET / POST that can be definitive. Thanks!
Every Rails site has:
meta content="authenticity_token" name="csrf-param'
Or could have a submit button where the name="commit"
At least that's what I have consistently seen.
Header responses are not reliable, here are three from various Rails sites:
Server:Apache/2.2.14 (Ubuntu)
Server:nginx
Server: thin 1.4.1 codename Chromeo
You know nginx and Thin are popular in the Rails community, but that's not conclusive enough to say there is Rails behind it. You would need to run a script that scrapes the site and looks for the meta-tag above. BeautifulSoup is a pretty good if your script is going to be in Python. Mechanize gem is great if you are going with Ruby.
Most rails apps have a submit button where the name="commit"
A Rails app could be running on lots of different ports, depending on the configuration allowed. That, plus the fact that the app might not respond in a way you can recognize, seems like a "sub-optimal" way to find out.
Instead, if you own the hosting, you own the drives and the systems supporting the apps. Why not run a grep across the systems, looking for strings matching Rails.
Or search for some of the standard Rails files; Use find, or locate if you have it running.
Another default setting of Rails that is commonly left untouched is the name of the main /assets/application-<hex hash>.{css,js} files.
I don't thing that a single reliable way of detecting Rails exists, but by using a combination of the authenticity_token, the default assets names and the HTTP headers, you should be able do identify the vast majority of the Rails apps.
The Wappalyzer script uses these three criteria and considers that the co-occurrence of two indicates a Rails app.
Wappalyzer is a good option, and (shameless plug) have you looked at Spotkick? We're in private beta now, but it's a distributed engine for running open source apps, so you could run Wappalyzer across all of your sites to see what's probably running rails.
I do this for banklook.com - I run over about 6800 banks to dig up details about security risks.
Let me know if you want more details or information.