Ruby on Rails RubyMine setup for win 7 - ruby-on-rails

I am trying to find a tutorial or a document or what ever which will show all the real steps with details how to setup my win 7 pc in order to debug - deploy a rails app through rubymine. I have found only spare pieces of the puzzle which i don't know how to connect.
I am newbie to ruby stuff, that's why i need details steps.
I will appreciate any help.

Download the rails installer.
http://railsinstaller.org
And then rubymine, and you should be good to.
That said, windows is less than ideal to do ruby develoment on. I did it for a while, and I spent to much time fighting the fact that ruby is best on a Unix based system. You can install ubuntu on a virtual machine and used than for your rails needs.
I think the best day to do this is to use vagrant. Check this http://www.confreaks.com/videos/2368-rmw2013-ready-to-code-automate-your-development-environment

Related

How do you test Rails on Windows?

I was dismayed to find that rake takes 20+ seconds to load before running my Rails tests. I searched and it seems that everything in Rails is just much slower on Windows. I tried to use spork but it doesn't work on Windows.
So how do you test Rails on Windows? How do you setup your environment?
How about continuous testing?
After a TON of searches the takeaways are:
1) Ruby (and therefore Rails) on Windows is painfully slow.
2) There's an attempt to make Ruby faster on windows (https://github.com/thecodeshop/ruby/wiki/Downloads). Although it's not as fast as in *nix, it's fast enough to work with.
So the answer is: Avoid developing Rails on Windows if you can. If you still want/have to develop on Windows then replace your Ruby files with The Code Shop's Ruby build, it will give you a workable speed.
As a side note, for all the talk about being open, embracing diversity, etc. the Ruby and Rails community is very antagonistic to people asking how to do X or Y on Windows. On my searches most of the posts I saw were to the tone of "Winblows sux00rz! get a Mac or Linux".
Update:
I got spork + autotest + growl working on Windows so testing is much faster and automated. I put the instructions in this blog post.

Deploying Rails app to a VPS

I've been building my first site using Rails, and I want to get it live. Up to now I've only ever put a site live by just dropping all the files onto my VPS via FTP, and I know that's not how it works with a Rails app.
What I don't know is where to even begin with making sure Rails is installed on my VPS (it's Linux based, I bought a package from Webfusion), and then how to deploy it and get it all running properly. My VPS has Plesk 10 installed on it, and from what I've read I need to install Rails alongside Plesk? I may have the wrong end of the stick, so don't hold back if I'm saying stupid things.
I realise this is a really green question to ask, but I've scoured forums looking for a solution I can understand and come up with nothing, so hoping someone here can help.
Thanks in advance!
I've never used a control panel like Plesk but I do have a VPS at linode.com. To get my rails sites up and running I got help from a smashingmagazine blog post and pro railscast episode. The railscast episode is not free but it has great info.
There are a lot of details with each step of getting a rails web server running on a VPS so please look at the blog or railscast video. But a high level overview of the steps is:
install rvm
install ruby and ruby gems
install rails
install a rails web server (a common option is passenger and nginx)
install a database (postgres is a common option)
capistrano for deployment
I wrote an ebook an this topic. After explaining how to set up a server from scratch it focuses on how to deploy an application manually, helping you to understand how this process works under the hood (I left automation out intentionally).
It covers a nginx/Unicorn/MySQL/rbenv setup. If you think that's something for you, you can get it here (it's free for people on my mailing list).

Install and start programming Ruby on Rails on Mac?

I would like to try ruby on rails on mac. I want to install ruby on rails, tried to find some guide for installation, and I get this:
ruby on rails official website??
It does not have a clear, I mean, well documentation for beginner to follow the steps? Or, thats all for the installation? How to start the webserver, where to store ruby files etc, ... how do I get started???
Any advise, or links or tutorials for a total ruby beginner to get started?
This is their official guide:
http://guides.rubyonrails.org/getting_started.html
You need to install xcode first though to avoid some errors. This is because some of the headers in the default ruby install on macs is incomplete without it.
Well you need GCC, which used to be with XCode only but over at ye olde GitHub, it's been packaged as a standalone. Next up you can follow either this tutorial by Katz or Dan Benjamin's guide on HiveLogic.
Keep in mind the state of the art in Ruby and Rails is fast moving so the guides might not take you all the way there. The most crucial parts are getting RVM installed properly and working and getting everything on the right version. It's not too tricky to work through, and there's probably no undocumented issues in the process now.

Where is best place to post a Ruby on Rails Installer?

I've figured out a really simple way to install Ruby on Rails with all the latest modules on Windows & created two installers for it. One with WAMP and one without that.
With that it takes only about 5 minutes to install Ruby and Rails + WAMP. As opposed to the hours that it might take to load and compile all the modules.
I'd like to share this with as many people as possible because I think more people could learn this great language and framework, if the installation of it wasn't such a hassle!
What would be the best place where I could upload these installers and where people who look for such thing would find it?
Host your project on github, and update/inform the ROR wiki about it, which would help others know about your installations and use them

RoR development-environment setup

I'm interested to play around with RoR a bit. Apart from literature i should read, i'm particularly interested about how to setup development environment.
Here's a good example how to setup environment for Java from Noda Time project wiki pages.
I want something similar but for RoR.
As far as i know - unix operation systems fits way much better (have toyed on windows 1 1/2 year ago - pure nightmare). So it would be nice to get some recommendations about linux distros and how to make it run next to win7/xp.
Basically - i want to shorten endless searching and improvisation until i can play with some code.
P.s. bonus for simple sample project. :)
The single quickest way to get up and running might be to simply grab Netbeans and develop against its built-in JRuby instance. It will walk you through setting up a Rails project and even give you some nice-to-haves like autocompletion.
Baring that, the easiest method is likely to download a Linux VM Appliance pre-Customized for Rails Development and a copy of VMWare Player.
The best 2 ways to go are OS X and Linux, I use Ubuntu just because it's the nicest package that I've found (there will no doubt be a variety of opinons on this.)
For Rails, I like to not use the packages or pre-installed versions, and instead build my own so I can test against various versions of ruby if need be. Hivelogic has a nice post about how to do it for OS X 10.6.
From there, you can just run:
rails myproject
cd myproject
./script/generate scaffold post title:string body:text
rake db:migrate
rm public/index.html
./script/server --debugging
And then connect to http://localhost:3000/posts to get to your application.
Once you get more comfortable, check out running Passenger instead, so you can have multiple applications running at the same time. On OSX there's even a nice Prefpane to easily set up new sites. This also ins't too hard in Ubuntu with the examples provided in the passenger docs.
For editing the application I think the IDEs (Aptana, Netbeans, etc.) are still too heavyweight, especially for small starter projects. I like Textmate (like everyone else) for OSX and gedit with gedit-mate.
Once you're writing applications, you'll find that railsapi has the best interface for browsing all of the various methods not only in Rails, but ruby, authlogic, and a bunch of other common gems.
Lastly, you'll want to look into source control, with git being preferred in the Rails community at the moment.
Good luck!
Get VMWare player
Get ubuntu vm
If it's server version - install desktop x or whatever it's called
Mess around with sudos, visudos
Mess around with vi editor to save newly created account to sudoers list
Mess around with vertical mouse scrolling which apparently does not
work on vmware+ubuntu
Finally install netbeans
Through plugins, install ruby on rails
Some global updating
Enjoy toying
tadaaaa...
Something like that i wanted - with each point explained a bit (no doubt that my steps aren't best ones and sounds funny for those who knows).
I guess that i forgot to mention that i lack knowledge of unix systems in general too.
Anyway - got what i was looking for. :)

Resources