HipByte / Flow

Cross-platform libraries for RubyMotion
BSD 2-Clause "Simplified" License
141 stars 29 forks source link

Tell how to add Flow to project without Bundler #8

Closed jlmuir closed 7 years ago

jlmuir commented 8 years ago

Improve the documentation for how to add FLow as a dependency of an existing project by making it clear that adding the motion-flow gem to the project's Gemfile works if using Bundler. Add how to add a dependency using the project's Rakefile if not using Bundler.

andrewhavens commented 7 years ago

@jlmuir Hmm...you really should be using Bundler. Is there a reason that you're not?

jlmuir commented 7 years ago

Hi, Andrew! There's not a strong reason that I'm not using Bundler. Actually, I use Bundler now, but I didn't at the time I submitted this pull request. I didn't know anything about Bundler at the time. I followed the instructions for adding the motion-flow gem to an existing project which said to add motion-flow to Gemfile. I didn't know that Gemfile was specific to Bundler. And, since I didn't have Bundler installed, it didn't work. Once I figured this out, I was just thinking to save someone else from the same trouble by providing clear instructions for adding the motion-flow gem in the case that Bundler is not being used, hence this pull request.

I initially got started with RubyMotion development by reading RubyMotion by Clay Allsopp. In that book, he does not use Bundler; instead he adds lines to Rakefile like require 'bubble-wrap'. So, I started out that way and didn't use Bundler.

Hopefully this helps explain what happened to me as a novice and why I created the pull request: the instructions assume Bundler is installed. If Bundler is required, then maybe instead of the change made in this pull request, it would be simple enough to add a $ gem install bundler line below $ gem install motion-flow in the Installation section, or just say that Bundler is required. Anyway, if you want to just close this pull request, that's OK with me too.

andrewhavens commented 7 years ago

@jlmuir Hmm...well Bundler is very common among Ruby projects. Even though it's not required, it should be considered standard practice. Unfortunately, it sounds like you slipped through the cracks and weren't introduced to Bundler when you started learning Ruby. The Flow template generates a Gemfile, but I think that it silences any "Bundler missing" errors, so maybe it should check for the presence of the bundler gem. Adding Flow to an existing RubyMotion app should be considered "Advanced" and uncommon. Maybe there's a way that we can make that more clear.

andrewhavens commented 7 years ago

@jlmuir I just submitted a PR which should solve the issue for you, and provide an error message which explains that you need to install bundler.