-
Notifications
You must be signed in to change notification settings - Fork 24
Computer Setup
Getting a computer set up for web development can sometimes be a frustrating task, especially for a new developer who has no context for what all of the tools do and how to read error messages when things go wrong. This is complicated further by the fact that some of us use Macs, others use Windows PCs, and others Linux.
###Installing Ruby & Rails ####Most People Most people will be able to use RailsInstaller to get everything up and running.
If you get an error about /opt/rix/
you will need to restart your computer to continue.
####Mavericks
If you are running OS X 10.9 Mavericks, you will not be able to run RailsInstaller. Talk to a TA or instructor in person to get instructions.
If you run into issues with sqlite3 or general compilation errors, try looking at this StackOverflow answer:
https://stackoverflow.com/questions/22970984/sqlite3-gem-compilation-error.
In short, Mavericks enabled additional compilation flags which treat unknown parameters as errors. Set the environment variable to ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future
to ignore.
There are other possible errors with Clang: https://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa.
If you are trying to get shifts to work, try using export CFLAGS=-Qunused-arguments
then ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future sudo -E bundle install
. Still getting an error with debugger https://github.com/cldwalker/debugger/issues/105. This is fixed by setting this portion in rbenv, which you probably forgot to do if you installed via homebrew: $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
EDIT 5/13/14: The above are mostly debug instructions. Try following https://github.com/yalestc/shifts/wiki and https://gorails.com/setup/osx/10.9-mavericks. If there are mysql errors like this:
Linking /usr/local/Cellar/mysql/5.6.17_1...
Error: Could not symlink include/mysql
/usr/local/include is not writable.
you have to chown /usr/local/include
, follow this: https://superuser.com/questions/435442/symlink-error-when-installing-mysql-via-homebrew
#####Experimental Testing Instructions RailsInstaller uses these packages:
Ruby 1.9.3 - stable is p545 according to https://www.ruby-lang.org/en/downloads/
, possible from rbenv are dev, p0, p125, p194, p286, p327, p362, p374, p385, p392, p429, p44 8, p484, p545, preview1, rc1
.
$ brew update
$ brew install rbenv
$ brew install ruby-build
$ rbenv install 1.9.3-p545
$ rbenv global 1.9.3-p545
Rails 3.2 - gem install rails
Bundler - gem install bundler
Git - probably already installed
Sqlite - see above
osx-gcc-installer - using XCode tools already
JewelryBox, RVM - I think we use rbenv?
SM Framework - not sure what this is https://smf.sh/
To make sure everything is running properly, run these commands in your Terminal (OS X) or GitBash (Windows).
ruby -v
rails -v
The output should indicate that you have ruby 1.9 or higher, and rails 4.0 or higher.
If you need to update your rails, you can run gem update rails
and then try rails -v
again. If you need to update ruby, ask a TA or instructor.
SublimeText is our suggested text editor. We'll use this to read/write our code. If you have a preferred text editor already, you're welcome to use that (though don't use something like TextEdit, NotePad, or MS Word, you want something optimized for programmers).
The TAs have recommended SublimeText 3, but 2 should work as well.
First, make sure you've installed Sublime Package Control.
Then to install packages, press Shift + CTRL + P (Windows) or SHIFT + CMD + P (Mac), then type 'install' and select 'Package Control: Install Packages'.
Here are some suggested packages:
- CoffeeScript
- ERB Snippets
- Git
- Git Gutter
- GitHubinator
- Lorem Ipsum Generator
- Ruby on Rails Snippets
- SCSS
- Sidebar Enhancements
- SublimeLinter
- Trailing Spaces
####A note on IDEs There are programs available called Integrated Development Environments (IDEs) which make it easy to manage and run your code. A popular one is RubyMine. It's ok to use these, but we've chosen not to highlight them in the course, because most people in the ruby community write how-to's assuming you're using a command line, and it's an important skill to master. We recommend that you just use SublimeText.
Follow these instructions. Be sure to follow the main instructions on that page. If you want to install the special GitHub app they mention at the top, that's fine too, but must install the stuff below it as well.
Git is a tool that helps us track changes, view history, and collaborate when coding. We call these types of tools Version Control Systems (VCS) and git is the most popular among developers with refined taste. :)
Github is a website / service based on git that makes it even easier to collaborate.
- Home
- Assignments
- Resources
- Piazza
- Last Summer's Wiki-Curriculum
- Code Examples from Class are in this course repository