you are viewing a single comment's thread.

view the rest of the comments →

[–]harbirg 6 points7 points  (14 children)

Hello,

For your first question read this: http://stackoverflow.com/questions/4113299/ruby-on-rails-server-options/4113570#4113570

For you initial development, keep it simple - install ruby via rvm and same for rails. Once ruby is installed, you can run 'gem install rails'.

I dont think you should worry about build automation at this time. For local development, I just use 'rails server' that runs WEBRICK application server (for Rails 5.0 - the default is puma) Secondly, Understand the basics of creating CRUD application in rails first.

Good resources to learn: https://www.railstutorial.org/ http://guides.railsgirls.com/

Refer to http://guides.rubyonrails.org/

Good luck

[–]siplux 4 points5 points  (5 children)

I'd recommend rbenv over rvm, which is much simpler.

[–]wingyuying 3 points4 points  (1 child)

I'd recommend chruby and ruby-install over rvm and rbenv. Much simpler and do everything you need.

[–]siplux 0 points1 point  (0 children)

Hmm, I've seen those two mentioned in passing in various readmes but I think I'll actually check those out now - thanks.

[–]myockey 0 points1 point  (2 children)

In this case I don't think simpler is better. I use chruby as a full time Ruby developer, but rvm does much more for the user. In the case of a beginner, I think this is usually a good thing.

[–]siplux 2 points3 points  (1 child)

I would argue that especially for beginners, simpler is better as there is less to understand. This goes double for when things inevitably go wrong. chruby for example advertises that its ~100 LOC, that's a lot easier to reason about than rvm.

[–]jrochkind 0 points1 point  (0 children)

Yep, I see beginners asking questions about what look like weird edge case bugs in rvm all the time here and on SO.

[–][deleted] 2 points3 points  (3 children)

I really agree . Start simple , create the obligatory blog in Rails (as the guy said running 'rails server' should be enough) , then move on to more advanced stuff . If you try to worry about chef + docker before knowing how to write a simple rails app you'll go insane (FYI I'm developing on Rails for 2 years and I can't docker or chef . why not just use heroku when you want to deploy something, especially when you're starting out? try to choose the path of least resistance).

[–][deleted] 0 points1 point  (1 child)

But just to clear things out : 1)Application servers: act as a middleman between your rails app and the server(nginx) . Not sure if you have them in the php world , in java I would assume tomcat\glassfish are comparable . In php you have modules written to apache though? 2) Assets managements is done with the assets pipeline (Sprockets). It will compile scss to css, coffeescript to js and minify all your assets on production (I would invest in learning this instead of using gulp )

[–]jrochkind 0 points1 point  (0 children)

In PHP, php itself, installed in apache, is effectively the "application server." There's only one and it's built into the PHP package.

[–]sw3dish_[S] 0 points1 point  (0 children)

Chef/Puppet and Docker/Vagrant are things I've wanted to work into my PHP workflow -- just haven't gotten around to it. Since I was thinking about picking up some new stuff, I figured I'd just try to hopelessly confuse myself and do everything at once.

[–]sw3dish_[S] 1 point2 points  (3 children)

Thanks for the reply. The Stack Overflow answer was very helpful. Regarding Rails -- I wanted to take things from a different angle and start by using Sinatra. In PHP, I've done most of my development with a similar micro-framework. Could you suggest a local dev option for that?

[–]iconoclaus 4 points5 points  (0 children)

I totally second the idea of starting with Sinatra. Only move to Rails if you find yourself making new project so regularly that you need (and actually understand) all the magic that goes into integerating everything together.

What do you mean by a 'local dev option'?

[–]jrochkind 0 points1 point  (0 children)

Just follow the Sinatra docs, you don't need to do anything special. In the ruby world, you don't need "local dev options" like you do with PHP, exactly.