Awesome Dev [10:26 AM]
Hi Amir, thanks for getting back to me!
Amir Rajan [10:28 AM]
Hey!!
So quick info about your background as a ruby dev? Beginner, Intermediate, Expert?
Awesome Dev [10:30 AM]
beginner, just completed a web dev course where we used it
Amir Rajan [10:30 AM]
gotcha
Just to make sure, you are on a Mac?
Awesome Dev [10:30 AM]
yessir
Amir Rajan [10:30 AM]
:tada:
K, first I'd install brew and rbenv to manage your ruby installations
https://brew.sh/ (edited)
https://github.com/rbenv/rbenv (edited)
after that you'll want to make sure you're on the latest version of git: brew install git will ensure that
then, you'll want to make sure you have XCode 9.2 installed (it's strongly recommended that you install from: https://developer.apple.com/download/more/)
(all this may take a while to get installed, but I'm here all day so just ping me)
Awesome Dev [10:34 AM]
sounds good, I've got it running now, thanks
Amir Rajan [10:35 AM]
you might have to install XCode before attempting to run brew commands (but brew will let you know if that's the case)
Awesome Dev [10:37 AM]
its finished installing and it looks like I'm good on the Xcode front
Amir Rajan [10:38 AM]
You'll want to open up XCode once (to accept the license agreement)
after that, in the terminal run xcode-select --install
Awesome Dev [10:42 AM]
done
Amir Rajan [10:42 AM]
cool
so try running motion create HelloWorld in the terminal and tell me what errors you get
Awesome Dev [10:45 AM]
I got error: cannot open .git/FETCH_HEAD: Permission denied, but then it created multiple folders and files
Amir Rajan [10:45 AM]
do you have a Github account?
Awesome Dev [10:45 AM]
i do
Amir Rajan [10:46 AM]
are you in a directory that's already a git repository?
the first time you run RubyMotion, it attempts to create a directory at ~/.rubymotion to house all the open source templates
Awesome Dev [10:47 AM]
I don't think I am
but I'll try creating in a different directory
Amir Rajan [10:48 AM]
I generally do
mkdir ~/projectscd ~/projectsmotion create HelloWorld
Awesome Dev [10:52 AM]
same error with the git fetch
Amir Rajan [10:52 AM]
that's odd...
let's try this
ls ~/.rubymotion
does it return anything?
Awesome Dev [10:54 AM]
rubymotion-command rubymotion-templates
Amir Rajan [10:54 AM]
cool, how about rbenv versions
Awesome Dev [10:55 AM]
-bash: rbenv: command not found
Amir Rajan [10:55 AM]
ah, so here is what's happening
ruby that ships with OSX required administrative privileges to run
so anything that was created with that has essentially admin access
we want to set up your system to use a version of ruby that's in "user land"
brew install rbenv
and then rbenv install 2.3.1
followed by rbenv global 2.3.1
(this is one of those "rites of passage" every ruby dev has to go through, I know it's a pain)
Awesome Dev [11:03 AM]
done!
Amir Rajan [11:03 AM]
awesome
so now if you type rbenv versions you should see something like this
└─» rbenv versions
system
1.8.7
* 2.3.1 (set by /usr/local/var/rbenv/version)
Awesome Dev [11:04 AM]
should I see 1.8.7
Amir Rajan [11:05 AM]
did the rbenv install 2.3.1 command run successfully?
(you may need to restart the terminal afterwards
Awesome Dev [11:06 AM]
it did, I see that line
Amir Rajan [11:06 AM]
rbenv global 2.3.1 should set it (edited)
Awesome Dev [11:06 AM]
that line didn't return anything
Amir Rajan [11:07 AM]
no worries, what do you see now when you try rbenv versions
Awesome Dev [11:07 AM]
system
2.3.1 (set by /Users/icevr/.rbenv/version)
Amir Rajan [11:07 AM]
\o/
perfect
now rm -rf ~/.rubymotion to get rid of the admin owned directory
Awesome Dev [11:09 AM]
:S permission denied
Amir Rajan [11:09 AM]
sudo
sudo rm -rf ~/.rubymotion
Awesome Dev [11:13 AM]
should that have returned anything?
Amir Rajan [11:13 AM]
nope, just no errors :grimacing:
Awesome Dev [11:13 AM]
ok :+1:
Amir Rajan [11:13 AM]
cool, noooowwww let's try creating a project again
cd ~/projectsmotion create HelloWorldAgain
Awesome Dev [11:15 AM]
no git error this time
Amir Rajan [11:15 AM]
best. day. ever.
k, cd HelloWorldAgainrake
you should see the iOS simulator popup with a fancy little app
Awesome Dev [11:16 AM]
:confused:
Print: Entry, ":CFBundleShortVersionString", Does Not Exist
Print: Entry, ":ProductBuildVersion", Does Not Exist
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
rake aborted!
NoMethodError: undefined method []' for nil:NilClass /Library/RubyMotion/lib/motion/project/xcode_config.rb:88:inxcode_version'
/Library/RubyMotion/lib/motion/project/xcode_config.rb:101:in validate' /Users/icevr/.rubymotion/rubymotion-templates/motion/project/template/ios/config.rb:133:invalidate'
/Library/RubyMotion/lib/motion/project/config.rb:123:in setup' /Library/RubyMotion/lib/motion/project/app.rb:66:inconfig'
/Users/icevr/.rubymotion/rubymotion-templates/motion/project/template/ios.rb:156:in `block in <top (required)>'
Tasks: TOP => default => simulator
(See full trace by running task with --trace)
Amir Rajan [11:17 AM]
xcode-select --install
(you may need to run it with sudo)
if you get a message that says it is already isntalled
run sudo xcode-select --reset
Awesome Dev [11:18 AM]
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
should I update?
Amir Rajan [11:19 AM]
try sudo xcode-select --reset
you should be on xcode 9.2 (you can double check if needed)
after the command above type xcode-select --print-path which should return:
Awesome Dev [11:22 AM]
ERROR! The requested deployment target SDK is not available or supported by RubyMotion at this time.
:confused:
Amir Rajan [11:22 AM]
no worries no worries :slightly_smiling_face:
ls /Library/RubyMotion/data/ios
Awesome Dev [11:23 AM]
11.2
Amir Rajan [11:24 AM]
kk, one sec
open up the Rakefile
you should see a line app.deployment_target = ..
set it to app.deployment_target = '11.2'
any luck ^
Awesome Dev [11:30 AM]
yep
Amir Rajan [11:30 AM]
something came up?
Awesome Dev [11:46 AM]
I don't think that's strictly a dev problem...it's an easy corner to cut
Amir Rajan [11:47 AM]
ya, and the market speak is really overbearing
it's hard to step back and look at the motives and long term support
so open Xcode
tap the menu item at the top left
and select preferences and then click components
Amir Rajan [11:49 AM]
uploaded this image: components
Amir Rajan [11:49 AM]
tap components and make sure you have some simulators installed
Awesome Dev [11:52 AM]
sorry, I'm having trouble finding the menu item
I haven't used Xcode much
Amir Rajan [11:53 AM]
XCode -> Preferences
When the XCode screen is in focus you’ll see the menu item right next to the Apple
Awesome Dev [11:54 AM]
thanks
Amir Rajan [11:56 AM]
Deploying to an actual iOS device requires you to fork over the $99 to Apple for a full blown dev license
But if you decide to do that, I’ll help you get to deploying to the device. Just ping me
Awesome Dev [11:31 AM]
just got distracted, sorry
Amir Rajan [11:31 AM]
no worries :slightly_smiling_face:
this is a nice little toolkit if you want to play around with native app development: https://github.com/infinitered/ProMotion
GitHub
infinitered/ProMotion
ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby. Star this repo to keep tabs on our progress!
if you want to play around with video games: https://github.com/amirrajan/RubyMotionSpriteKit
GitHub
amirrajan/RubyMotionSpriteKit
RubyMotionSpriteKit - Batteries included SpriteKit
Awesome Dev [11:32 AM]
sorry, i just ran the rake again and got the same error
Amir Rajan [11:32 AM]
and for wrapping a responsive website (rails website): https://github.com/amirrajan/RubyMotionWebApp
GitHub
amirrajan/RubyMotionWebApp
Contribute to RubyMotionWebApp development by creating an account on GitHub.
Convo on Slack:
Awesome Dev [10:26 AM] Hi Amir, thanks for getting back to me!
Amir Rajan [10:28 AM] Hey!! So quick info about your background as a ruby dev? Beginner, Intermediate, Expert?
Awesome Dev [10:30 AM] beginner, just completed a web dev course where we used it
Amir Rajan [10:30 AM] gotcha Just to make sure, you are on a Mac?
Awesome Dev [10:30 AM] yessir
Amir Rajan [10:30 AM] :tada: K, first I'd install
brew
andrbenv
to manage your ruby installations https://brew.sh/ (edited) https://github.com/rbenv/rbenv (edited) after that you'll want to make sure you're on the latest version of git:brew install git
will ensure that then, you'll want to make sure you have XCode 9.2 installed (it's strongly recommended that you install from: https://developer.apple.com/download/more/) (all this may take a while to get installed, but I'm here all day so just ping me)Awesome Dev [10:34 AM] sounds good, I've got it running now, thanks
Amir Rajan [10:35 AM] you might have to install XCode before attempting to run brew commands (but brew will let you know if that's the case)
Awesome Dev [10:37 AM] its finished installing and it looks like I'm good on the Xcode front
Amir Rajan [10:38 AM] You'll want to open up XCode once (to accept the license agreement) after that, in the terminal run
xcode-select --install
Awesome Dev [10:42 AM] done
Amir Rajan [10:42 AM] cool so try running
motion create HelloWorld
in the terminal and tell me what errors you getAwesome Dev [10:45 AM] I got error: cannot open .git/FETCH_HEAD: Permission denied, but then it created multiple folders and files
Amir Rajan [10:45 AM] do you have a Github account?
Awesome Dev [10:45 AM] i do
Amir Rajan [10:46 AM] are you in a directory that's already a git repository? the first time you run RubyMotion, it attempts to create a directory at ~/.rubymotion to house all the open source templates
Awesome Dev [10:47 AM] I don't think I am but I'll try creating in a different directory
Amir Rajan [10:48 AM] I generally do
mkdir ~/projects
cd ~/projects
motion create HelloWorld
Awesome Dev [10:52 AM] same error with the git fetch
Amir Rajan [10:52 AM] that's odd... let's try this
ls ~/.rubymotion
does it return anything?Awesome Dev [10:54 AM] rubymotion-command rubymotion-templates
Amir Rajan [10:54 AM] cool, how about
rbenv versions
Awesome Dev [10:55 AM] -bash: rbenv: command not found
Amir Rajan [10:55 AM] ah, so here is what's happening
ruby
that ships with OSX required administrative privileges to run so anything that was created with that has essentially admin access we want to set up your system to use a version of ruby that's in "user land"brew install rbenv
and thenrbenv install 2.3.1
followed byrbenv global 2.3.1
(this is one of those "rites of passage" every ruby dev has to go through, I know it's a pain)Awesome Dev [11:03 AM] done!
Amir Rajan [11:03 AM] awesome so now if you type
rbenv versions
you should see something like thisAwesome Dev [11:04 AM] should I see 1.8.7
Amir Rajan [11:05 AM] did the
rbenv install 2.3.1
command run successfully? (you may need to restart the terminal afterwardsAwesome Dev [11:06 AM] it did, I see that line
Amir Rajan [11:06 AM]
rbenv global 2.3.1
should set it (edited)Awesome Dev [11:06 AM] that line didn't return anything
Amir Rajan [11:07 AM] no worries, what do you see now when you try
rbenv versions
Awesome Dev [11:07 AM] system
Amir Rajan [11:07 AM] \o/ perfect now
rm -rf ~/.rubymotion
to get rid of the admin owned directoryAwesome Dev [11:09 AM] :S permission denied
Amir Rajan [11:09 AM] sudo
sudo rm -rf ~/.rubymotion
Awesome Dev [11:13 AM] should that have returned anything?
Amir Rajan [11:13 AM] nope, just no errors :grimacing:
Awesome Dev [11:13 AM] ok :+1:
Amir Rajan [11:13 AM] cool, noooowwww let's try creating a project again
cd ~/projects
motion create HelloWorldAgain
Awesome Dev [11:15 AM] no git error this time
Amir Rajan [11:15 AM] best. day. ever. k,
cd HelloWorldAgain
rake
you should see the iOS simulator popup with a fancy little appAwesome Dev [11:16 AM] :confused: Print: Entry, ":CFBundleShortVersionString", Does Not Exist Print: Entry, ":ProductBuildVersion", Does Not Exist xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance rake aborted! NoMethodError: undefined method
[]' for nil:NilClass /Library/RubyMotion/lib/motion/project/xcode_config.rb:88:in
xcode_version' /Library/RubyMotion/lib/motion/project/xcode_config.rb:101:invalidate' /Users/icevr/.rubymotion/rubymotion-templates/motion/project/template/ios/config.rb:133:in
validate' /Library/RubyMotion/lib/motion/project/config.rb:123:insetup' /Library/RubyMotion/lib/motion/project/app.rb:66:in
config' /Users/icevr/.rubymotion/rubymotion-templates/motion/project/template/ios.rb:156:in `block in <top (required)>' Tasks: TOP => default => simulator (See full trace by running task with --trace)Amir Rajan [11:17 AM]
xcode-select --install
(you may need to run it withsudo
) if you get a message that says it is already isntalled runsudo xcode-select --reset
Awesome Dev [11:18 AM] xcode-select: error: command line tools are already installed, use "Software Update" to install updates should I update?
Amir Rajan [11:19 AM] try
sudo xcode-select --reset
you should be on xcode 9.2 (you can double check if needed) after the command above typexcode-select --print-path
which should return:Awesome Dev [11:21 AM] yep
Amir Rajan [11:21 AM] kk, now try
rake
againAwesome Dev [11:22 AM] ERROR! The requested deployment target SDK is not available or supported by RubyMotion at this time. :confused:
Amir Rajan [11:22 AM] no worries no worries :slightly_smiling_face:
ls /Library/RubyMotion/data/ios
Awesome Dev [11:23 AM] 11.2
Amir Rajan [11:24 AM] kk, one sec open up the
Rakefile
you should see a lineapp.deployment_target = ..
set it toapp.deployment_target = '11.2'
any luck ^Awesome Dev [11:30 AM] yep
Amir Rajan [11:30 AM] something came up?
Awesome Dev [11:46 AM] I don't think that's strictly a dev problem...it's an easy corner to cut
Amir Rajan [11:47 AM] ya, and the market speak is really overbearing it's hard to step back and look at the motives and long term support so open Xcode tap the menu item at the top left and select preferences and then click components
Amir Rajan [11:49 AM] uploaded this image: components
Amir Rajan [11:49 AM] tap components and make sure you have some simulators installed
Awesome Dev [11:52 AM] sorry, I'm having trouble finding the menu item I haven't used Xcode much
Amir Rajan [11:53 AM] XCode -> Preferences When the XCode screen is in focus you’ll see the menu item right next to the Apple
Awesome Dev [11:54 AM] thanks
Amir Rajan [11:56 AM] Deploying to an actual iOS device requires you to fork over the $99 to Apple for a full blown dev license But if you decide to do that, I’ll help you get to deploying to the device. Just ping me
Awesome Dev [11:31 AM] just got distracted, sorry
Amir Rajan [11:31 AM] no worries :slightly_smiling_face: this is a nice little toolkit if you want to play around with native app development: https://github.com/infinitered/ProMotion GitHub infinitered/ProMotion ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby. Star this repo to keep tabs on our progress! if you want to play around with video games: https://github.com/amirrajan/RubyMotionSpriteKit GitHub amirrajan/RubyMotionSpriteKit RubyMotionSpriteKit - Batteries included SpriteKit
Awesome Dev [11:32 AM] sorry, i just ran the rake again and got the same error
Amir Rajan [11:32 AM] and for wrapping a responsive website (rails website): https://github.com/amirrajan/RubyMotionWebApp GitHub amirrajan/RubyMotionWebApp Contribute to RubyMotionWebApp development by creating an account on GitHub.
Amir Rajan [11:42 AM] This is really really really important to me. It's worth a read and what sets RM apart from the rest of the stuff out there: http://www.rubymotion.com/news/2018/02/12/rubymotion-guiding-principals.html rubymotion.com RubyMotion's Guiding Principles Write cross-platform apps for iOS, Android and OS X in Ruby http://www.rubymotion.com/img/rubymotion-logo.png these days I feel devs take some of the more human things for granted and just follow what facebook, et al do (edited)