I've been looking for an AMI that has basically an updated version of ruby gems, thin and nginx and mysql installed.
EC2onRails seems to be left alone now since Paul decided to leave the project.
If you were to deploy your Rails App in the cloud, what are your benchmarks? Recommendations?
I could not find good enough an answer to this question so finally went for deploying ruby 1.9.2 and Rails3 from scratch as mentioned here .. http://blog.enbake.com/setting-up-rails-3-stack-on-an-amazon-ec2-instance/
This may be a good head start
http://thecloudmarket.com/tag/rails
Related
I know this is not the right type of question for Stack Overflow (please forgive me), but I've spent hours trying to get Discourse to run on my machine. It was working before, but I upgraded to Ruby 2.0 and Rails 4 and now I simply can't get it working due to various errors (mounting NFS, Syck deprecated, TheRubyRacer not installing properly).
I tackled these one by one, and now when I SSH into vagrant it says cannot find the gemfile when I do bundle install. I think I may have altered something and it's not "SSH-ing" into the proper folder, but I did a lot of things based on what I googled / found on stackoverflow and am kind of stuck.
I know this is a very vague / poorly structured question, but I'm still new to programming and just wondering, does Discourse work with Ruby 2.0/Rails 4 and can someone point me in the right direction regarding how to tell if I somehow broke my SSH command?
Based on the Discourse source code and mainly based on the Gemfile/Gemfile.lock
the rails version is Rails v3.2.12 and probably they are using Ruby 1.9.x
Edit 1
Based on Rails's Travis CI Builds it looks that rails supports ruby 2.0. I don't know if Rails 3.2.12 supports it - but my guess is that you should have little or no issue to run Discourse on Ruby 2.0.
Edit 2
Moreover it looks that Discourse Builds against Ruby 2.0 without problems.
Are you in the root directory of the app after you ssh?
cd /vagrant
I am an absolute newbie to web development and ruby on rails. I am planing to deploy a ror application on the Linode 512 plan. My website would be basically a forum that allows users to upload photos using Ruby 1.9.3 and Rails 3.2.
Which OS should I use? What are their difference? (Ubuntu / Debian / CentOS / Fedora)
Should I use Apache or Nginx? What are their difference?
Should I use PostgreSQL, MySQL, MongoDB or any other kinds of DB provided on Linode? What are their difference?
My target audience would come from China which means I can't use Amazon S3. Should I let the users upload the photos to the Linode server?
Is there any step-by-step beginner‘s guide for this issue?
Thx
First of all, I think you are worrying too much. If you are a newbie, just follow the popular choice for a start, then change, modify, scale as you go. As your skills mature, you will know what best suites you.
Below are some choices that will be easier for you:
Which OS should I use? What are their difference? Ubuntu
Should I use Apache or Nginx? What are their difference? Apache. If it is a small website, it doesn't matter for now.
Should I use PostgreSQL, MySQL, MongoDB or any other kinds of DB provided on Linode? What are their difference? MySQL. MongoDB is a NoSQL database, may not be for you for the moment.
My target audience would come from China which means I can't use Amazon S3. Should I let the users upload the photos to the Linode server? Upload to Linode for now. Don't scale it prematurely.
Is there any step-by-step beginner‘s guide for this issue? Ryan's RailsCasts: http://railscasts.com/episodes/373-zero-downtime-deployment and http://railscasts.com/episodes/335-deploying-to-a-vps, they are must-watch, but not free.
For all these setup, Linode's tutorial is good for a start. You should look at #Stefan answer too.
You should also try to deploy to Heroku just to get a feel of it. Rails Tutorial is good for you to learn up from development to deployment.
There are several dedicated Rails setup guides on Linode:
Apache and Passenger:
Ruby on Rails with Apache on Debian 6 (Squeeze)
Ruby on Rails with Apache on Ubuntu 10.04 (Lucid)
Ruby on Rails with Apache on Ubuntu 10.10 (Maverick)
nginx and Passenger:
Ruby on Rails with Nginx on Ubuntu 10.04 (Lucid)
Ruby on Rails with Nginx on Ubuntu 10.10 (Maverick)
Ruby on Rails with Nginx on Debian 5 (Lenny)
Ruby on Rails with Nginx on CentOS 5
As we have many linode deployment for rails apps my recommendation would be:
ubuntu/centos + mysql/postgres + nginx + passenger
If your application is going to have huge fb inout operations then you can mongodb as choice
I have originally been hosting my apps on Heroku, however this is not an acceptable deployment method in my current environment. We have personal information in our applications that deploying to Heroku and setting up DNS forwarding is not acceptable. Regardless of how 'secure' or 'reliable' anyone may think it is, it is just not acceptable in my case.
Our host is siteturn.com, integrated with Plesk 10.4.4. If I SSH onto our websites server as admin and type
ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux].
rails -v
Rails 2.3.5
It appears Ruby and Rails are already installed (Older versions than I require, as I need ruby 1.9.3 and Rails 3.2) If I'm not mistaken it seems like my host 'supports' rails (why else would it already have it installed :P).
How should I go about deploying my application directly onto my companies website?
Heroku is an awesome service but the ease of deploying to Heroku has given you a skewed view of what is involved in hosting your own rails website. Heroku has shielded you from a lot of the hard parts.
For example, just because ruby and rails is installed does not necessarily mean you can host a production rails website. You'll need a rails specific web server (for example nginx and passenger, unicorn, etc). You also need a database (MySQL or Postgres) assuming your web app uses one. Also, as you said you need to upgrade the versions of ruby and rails.
That's just to get the server setup. After that you can get to the deployment part. Capistrano seems to be the most popular choice right now.
Take a look at this railscast episode on deploying to a virtual private server for a very good overview of what is involved. It also briefly goes into Capistrano as well. It's not a free episode but I feel it's definitly worth the money.
Pick up a copy of Agile Web Development with Rails, Third Edition and read what it says about deployment. That should get you started. There's more info required than can be put in a SO answer.
I'm very new to ruby and I can run ruby scripts on command line easily, but I want to output my script to a browser, not just using the command line.
Your help will be much appreciated, thanks.
Passenger is probably the easiest way to run Rails applications.
I'd recommend either Passenger or Unicorn, both of which are extremely popular in production environments. Passenger is typically easier to setup.
See this blog post:
"Install RVM, Passenger, Nginx and Rails 3 on Ubuntu Lucid Lynx". You can use WEBrick/Thin for development perhaps.
I am new to Ruby on Rails.
I have built a demo site with Refinery CMS on my Mac environment and am ready to deploy it to my Virtual Dedicated Server running CentOS 5.x.
Can anyone walk me through the steps to deploy Refinery CMS on my server?
NOTE: I have successfully installed Ruby, Rails (correct versions to Refinery specs) and all the needed gems including Passenger.
I simply cannot figure out how to make the site work on my server. I would really appreciate some help on this as documentation is difficult to come by, I have already spent over $100 on books and they are of no help.
Thank you!!!!