

Help with Rails? - jrbeal

This is my first post and I hope it&#x27;s appropriate for the site. My son admires HN and recommended I ask for help here. I&#x27;m an &quot;old&quot; CS guy (graduated back in the 80&#x27;s) and have NOT kept my skills up-to-date as my career led me from development to mostly sysad stuff. So for the last few years, I&#x27;ve had this web site idea and spent the last year designing it while trying to learn Ruby on Rails (using Mark Hartl&#x27;s tutorial). Setting up a Linux VDI and getting the environment right is driving me crazy. It&#x27;s always one problem after another. I&#x27;m normally a very persistant guy but Hartl&#x27;s recommended problem solving algorithm (google it) doesn&#x27;t always work. I&#x27;m at the point where I&#x27;ll do anything just to get this project off the ground. Any ideas or suggestions? I&#x27;d pay someone to help me but I don&#x27;t know where to find such a person.
======
jrbeal
Wow! My son was right! This site is awesome! Thanks SO much everyone! Good
question wintermute. I wanted a Linux development environment but only have
Windows at home. I was thinking about buying another box just for this purpose
and load native Linux thinking this would be less ghetto but I don't know...

Thanks for the offer benigeri! I'll hit you up later...

thinkful.com sounds like a great resource.

shail: There were way too many problems to list here. Basically, the pattern I
was falling into was as follows: I'd start a new project, start setting
everything up, run into problems, fix them, run into more problems, fix them,
etc... I'd have problems with everything from running bundle successfully, to
deploying successfully. Then I'd get to the point where nothing would work and
I'd eventually start over. Very frustrating.

The suggestions here are giving me hope and renewed enthusiasm. I'll check
back later...

~~~
jey
I would suggest running Linux in a virtual machine. A decent choice would be
the combination of Ubuntu running under VirtualBox (a free VM). Here's a
random guide I found online (I'm not vouching for its veracity):
[http://www.psychocats.net/ubuntu/virtualbox](http://www.psychocats.net/ubuntu/virtualbox)

I bet it's possible to do all this stuff under Windows natively too, but it's
probably going to be harder to find help. So if you have some familiarity with
UNIX-like OSes already, I'd suggest just using something like Ubuntu in a VM.

~~~
jrbeal
Jey, I've tried to avoid installing Ruby and Rails on Windows because of all
the horror stories out there. I had no problem installing VirtualBox and
creating a Linux Mint VDI. In fact, I've worked with UNIX for the last 25+
years so I'm actually more comfortable with it (or Linux) than Windows. My
problems are with Ruby and Rails and all the associated gems, getting the
Gemfile right, understanding what the hell I'm doing with Github (git commit
this, git commit that, etc.) And then running the server only to get a bunch
of screwy errors that make no sense. But thanks to all the support in this
thread, I'm sure I'll make headway soon. Thanks!

------
losvedir
Oh, boy. I've gotten our rails dev environment set up on a dozen different
machines now and there's always a little problem here or there. One thing I
can say right off the bat: I could never get it fully up and running on
Windows, unfortunately.

But we have had success on both OS X and Linux machines.

The trick is to 1) install rbenv or rvm, 2) build the right version of ruby,
3) install the right gems, 4) make sure your PATH is set up properly.

The rails consultancy thoughtbot has a script you can run to just magically
set up a new laptop for rails development. I don't do this (too magical, and
too little control), but I usually pull up the script[1] just to remind myself
of what things I need to attend to and install.

Feel free to hit me up at my email address in my profile if you're stumped on
something. I've probably seen most issues by now...

[1]
[https://raw.github.com/thoughtbot/laptop/master/linux](https://raw.github.com/thoughtbot/laptop/master/linux)

~~~
nwienert
I know you're not on a mac, but I just re-setup a mac and went through this.
So, for anyone wondering. Luckily with homebrew supporting rbenv now it's a
lot easier to do.

Download the git installer and run it.

Install homebrew using their script.

brew install rbenv

brew install ruby-build

Once that is done you'll need to copy some stuff in your shell profile. It
will tell you the two lines. Restart your shell.

Here's the first trick. You need openssl:

brew install open-ssl

(make sure "qmake" is now available or restart shell and see)

To see ruby versions: rbenv install -l

I installed 2.0.0-rc2: rbenv install 2.0.0-rc2

Almost there! Set it as your global ruby

rbenv global 2.0.0-rc2

Make sure this outputs the right ruby version now: ruby -v

Now install bundler and rails!

gem install bundler

gem install rails

I probably missed a step or two, but I just ran through that process and had a
few bumps in the road as usual myself.

~~~
kot-behemoth
Correct me if I'm missing something, but why exactly are you using 2.0.0-rc2,
when there is 2.0.0-p247 available?

I'd suggest doing

    
    
        rbenv install 2.0.0-p247
    
        rbenv global 2.0.0-p247
    

Also, it's openssl, not open-ssl, (just in case someone couldn't complete the
step) i.e.

    
    
        brew install openssl

------
charlesju
1\. Use Heroku or Engine Yard 2\. Start with a hello world and build from
there one feature at a time 3\. When you get stuck, use Stack Overflow or
other Ruby on Rails forums for help as opposed to HN, we're not a terribly
good source.

Good luck :)

------
chrismealy
Don't worry, it's like this for everybody. Just hang in there. Suddenly it'll
all come together and you'll forget what was so hard about it.

~~~
jrbeal
Can't wait for that "aha" moment when everything starts making sense! Until
now, It's been pretty much me and google. I'm very encouraged by the support
from everyone on this site. Thanks you very much!

------
adamzerner
I started learning Rails this summer too! Chapter 1 (the set up) was very
annoying, like he warns. StackOverflow is great though! People often answer
your questions within minutes (if you word them well and put thought into
them). That's the best advice I've got for chapter 1. It's something that is
going to be annoying.

I'd recommend going through his tutorial rather briefly first. Like a skim.
Then read through
[http://guides.rubyonrails.org/](http://guides.rubyonrails.org/). Then go
through is tutorial one more time. Then try building your website, while using
Railscasts and StackOverflow for help.

See [http://fast-reaches-9399.herokuapp.com/how-to-learn-to-
progr...](http://fast-reaches-9399.herokuapp.com/how-to-learn-to-program) for
more information. Good luck!

------
awongh
you could try vagrant, not sure if its the VDI that you were referring to, but
I would say that setup generally seems smoother inside of linux vs. other
environments (so it's worth it to deal with the extra complexity of a vm)

there are a bunch of github projects that you can get that has everything to
setup a VDI- this one seems popular: [https://github.com/amaia/rails-starter-
box](https://github.com/amaia/rails-starter-box)

there's also a railscast about it:
[http://railscasts.com/episodes/292-virtual-machines-with-
vag...](http://railscasts.com/episodes/292-virtual-machines-with-vagrant)

------
cpursley
I highly recommend Action.io - a cloud-based linux development environment and
IDE that I wish were around when I got started. I literally created a new box,
cloned a rails app from github, raked the db and fired up rails server in less
than three minutes.

Really, check it out if you're having difficulty getting your environment set
up. Here's a link to get started
[https://www.nitrous.io/join/BiSdgSxLjIk](https://www.nitrous.io/join/BiSdgSxLjIk)
(full disclosure: it's a referral link that will get me No2 credits).

And when you're ready to deploy, just use Heroku. Good luck and keep at it!

------
dreyfiz
1\. Get on IRC, people hang out there all day waiting to help people for free.

2\. Here's a volunteer hotline to call for help:
[http://rails.pockethotline.com/](http://rails.pockethotline.com/)

~~~
mst
And then _stay_ on IRC - and try and help other people with their problems as
a displacement activity while you're letting your subconscious work on
something else.

Not only will you learn things by trying to help, but you'll demonstrate value
as a community member which will improve the quality of the help you receive
as well.

~~~
jrbeal
Understood!

------
w1ntermute
Why do you need a Linux VDI? Test locally with the Rails server, then deploy
to Heroku.

~~~
kiallmacinnes
So.. You're half right IMHO!

A linux desktop is entirely unnecessary. But so is Heroku.

This "just deploy to Heroku" mentality is really starting to get on my nerves.

Heroku is a great product that solves real problems for a certain class of
project (and user). It is not, in any way, shape or form, the solution to
every problem. Stop telling people it is.

~~~
aaronblohowiak
Deploying someone's first RoR project seems like exactly the class of project
and user that Heroku is a good fit for.

------
benigeri
Hey jrbeal, I've had the same problems. I taught myself ROR over the past year
and I had huge issues getting it off the ground. I've been through over 20
different sets of tutorials, so I'm sure I can help out.

I also had a lot of initial difficulty setting up my environments, but I've
gotten a lot better at it now.

If you'd like, send me an email benigeri@stanford.edu and I can try to help
you and point you to good resources. It's a little hard to suggest anything
right now since I don't have any context.

So send me an email and I'll try to help you as much as I can, pro-bono.

------
gtani
Are there ruby or rails user groups/meetups around you? If not, there's a
bunch of mentor groups, or reddit seems pretty supportive. Stackoverflow is
pretty good but there aren't enought people answering questions for the volume
they're getting

[http://www.railsmentors.org/](http://www.railsmentors.org/)

[https://github.com/rails-oceania/roro/wiki/Available-
mentors](https://github.com/rails-oceania/roro/wiki/Available-mentors)

[http://www.reddit.com/r/rails/](http://www.reddit.com/r/rails/)

[http://installfest.railsbridge.org/installfest/](http://installfest.railsbridge.org/installfest/)
(Railsbridge is a fantastic organization, if you emailed i bet they would help

I've been going thru same thing, my MBP hard drive died, so i installed RVM,
bundler, and rails 3.2 on a couple ubuntu 12.04 laptops while i'm waiting for
my Snow leopard install DVD. The key insight is to write down every step if
you have to back out. And read 2 or 3 blogs and see what they agree on before
starting install. These are good for 12.04

[http://excid3.com/blog/setting-up-ubuntu-12-04-with-
ruby-1-9...](http://excid3.com/blog/setting-up-ubuntu-12-04-with-
ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/)

[http://footyntech.wordpress.com/2012/09/19/installing-
ruby-r...](http://footyntech.wordpress.com/2012/09/19/installing-ruby-rails-
ubuntu-12-0/)

------
eccp
Coming from a Windows-only background you'll find it's probably a much
smoother experience while developing on a Linux desktop or in Mac OS X.

Installing a nice Ubuntu 13.04 desktop is not complex, there a video which
explains installing Virtualbox and Ubuntu under ten minutes:
[http://www.youtube.com/watch?v=0WiiswmOH1Q](http://www.youtube.com/watch?v=0WiiswmOH1Q)
... note that a desktop is not _required_ but given your background you would
feel more comfortable having a desktop, graphical text editor (eg. gEdit or
Sublime Text) and one or more terminals to run the commands.

Another option would be to install Cygwin, an Unix-like environment for
Windows:
[http://www.youtube.com/watch?v=WRB9t2tSsjY](http://www.youtube.com/watch?v=WRB9t2tSsjY)
and continue the tutorial from there.

Honestly, I think that if you have sysadmin skills, it's likely you'll have
some Unix exposure, and if you don't have yet, learning Ubuntu and Linux will
be a benefit on the long run.

~~~
Felix21
Try Linux Mint instead...

Its Ubuntu under the hood, but has a windows like UI.

I almost gave up on Rails because I was using windows; life is easier as a
rails developer with Linux or a Mac.

------
titlex
Check out [http://railscasts.com](http://railscasts.com)
[http://peepcode.com](http://peepcode.com)
[http://lynda.com](http://lynda.com)
[http://codeschool.com](http://codeschool.com)

------
kot-behemoth
This thread turned out to be a great source of information right when I needed
it! Thanks, everyone!

However, I'm just starting to work on a webapp for a client (learning from
scratch, this is my first big project in Rails), and I was wondering which
version to start with. Since I'm starting with no pre-existing codebase, it's
very tempting to go with Rails 4.0 as opposed to 3.2, but I'm afraid not all
essential gems support it yet. Also, there probably isn't as much information
for bugs and problems etc.

Any advice would be greatly appreciated!

------
benackles
Michael is very responsive to questions although you should first use his
debugging tips. He'll usually fix your problem with one line of code.

[http://ruby.railstutorial.org/help](http://ruby.railstutorial.org/help)

If you don't find your answer from either the debugging tips or a Google
search, try writing your question on StackOverflow. Most of the issues you
face are probably solvable by knowing what line of your error to search for.

------
tjbiddle
I've always found it's a lot easier if you learn the language (And others'
habits & conventions) before picking up the framework. Rails will come a lot
easier after you're familiar with Ruby and getting the correct environment
setup (RVM/RBEnv, Familiarity with popular libraries, etc)

Best of luck!

------
rfelix2121
Maybe I can help! [http://askabootstrapper.com](http://askabootstrapper.com)

------
gverri
My tip: DON'T USE RVM. (rbenv is a good alternative)

RVM is the nº1 source of problem in Ruby envs.

~~~
bittired
RVM is not that terrible. If your biggest difficulty in Ruby or Rails is RVM,
you haven't been around long.

The cause of problems for beginners is quite simply "change". Rails has been
through a few major revisions now, and the jump from 2 to 3 dropped a lot of
people (even though 3.1.x+ has been fine), and I doubt many will drop again
from 3 to 4, even though there are some big changes. The problem is that with
all of the changes comes a bunch of now inaccurate information that no one
will update that is found easily, some with high point rankings in S.O.

The more important problem to fix though is leadership. DHH has done a great
job, but either he or someone else needs to be more vocal as a single voice
leading Rails. It is led by committee currently, and it shows in the lack of
vision. However, despite its problems, I'm in it for the long haul. I like it
a lot better than everything else.

------
zengr
I stumbled across thinkful recently:
[http://www.thinkful.com](http://www.thinkful.com) and I think having a mentor
while learning to code (especially web dev) is really helpful.

PS: I have not used thinkful before.

------
mcx
I follow this guide to set up rvm, ruby, and rails:
[http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-
you/](http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/)

------
shail
Could you describe the problems you are facing in more detail?

I guess you would not have to pay to get directions. One-on-one help might
need payment.

------
groundCode
Maybe stackoverflow or serverfault could help if you are having specific
issues with the code or the server setup?

------
gary4gar
Hey, I would love to help. no need of payment, just a thank you is enough.
Contact me, email in profile

------
troels
I love Rails, but I think it might be better for you to go with a PHP
framework. PHP is just dead simple to get running and deploy. I would suggest
something like Yii or Codeigniter, both of which are somewhat similar to Rails
in their architecture.

~~~
cheald
That's all well and good, unless you're actually wanting to learn Rails. :)

~~~
troels
Of course. My impression was that Rails was just a means to an end though.
That said, learning Rails would probably be a lot easier after first grokking
a simpler php setup.

------
heldrida
jrbeal, you can try Laravel, it's a Php Framework and you can setup everything
in a couple of minutes and probably develop your idea without having to deal
with all those issues.

------
woah
Use node.js! It's as easy as npm install, npm start. Few other steps for the
mongodb as well. None of this weird rvm crap. 90% of the time we're just
putting text on the screen in various arrangements. Doesn't need to be rocket
science.

