This is the website for the Codeology club at Berkeley
To make minor changes, please refer to bulma documentation to get familiarized with the CSS framework.
To make large changes skim getting started with rails to get familiarized with how ruby on rails works. Knowledge of MVC, how data is passed between them, and embedded ruby are of particular interest.
Before getting started, make sure you're running the latest MacOS, installed all the security updates, and installed all XCode developer tools.
If you do not have Ruby on Rails on your system, please follow the instructions at installrails.com.
Check out this repository to your local workspace (GitHub for Mac is recommended, or simply use
rbenv install 2.2.2 rbenv local 2.2.2 gem install bundler
brew install mysql
Finally, install the gems necessary for development, testing, and deployment:
If you run into an error with incompatible Ruby Versions, check here and see if you need to update your ~/.bash_profile 's PATH accordingly).
If you have trouble installing libv8 on El Capitan, see here.
Make sure to run
to initialize the website's internal database.
When developing on local, you need to instantiate a PG server instance in order to run Cucumber tests and start Rails on your local environment. The typical way to do this on Mac OS X is through
initdb /usr/local/var/postgres -E utf8
if you need to initialize a PG server instance, and
pg_ctl -D /usr/local/var/postgres -l logfile start
to start the server.
You will need to install these:
- A Ruby Installer You can find ruby-installer here. We are using Ruby 2.2.2. Make sure you select the appropriate version (32 vs. 64 bit).
- A Ruby Manager You can find chruby here (the sibling to ruby-install). Chruby allows you to switch between multiple Rubies (Ruby Versions).
- A Gem Manager You can find bundler here. Bundler makes managing gems (Ruby packages) easier for your projects. (gem install bundler)
- Rails Run
gem install rails
- PostgreSQL which can be found here. Make sure you select the appropriate version to your OS (32 vs. 64 bit).
- Ruby for VSCode (If you use VSC) Visual Studio Code has a package that has Ruby language and debugging support here.
- These steps are necessary for you to run
rails serverto start up a local server for you to test/develop on.
- After installing PostgreSQL, open pgAdmin (comes with installation) and create the databases listed in the
database.ymlfile. Currently the dev database should be: "db/development" (the slash is part of the name)
- You will also need to modify the
database.ymlfile by adding:
password: passwordin the
defaultblock where username and passwords are what you set during installation of PostgreSQL. A detailed explanation of why we use
host: ""can be found here.
- If you plan on making changes to the database make sure you read up on migrations before doing so.
- If you get an SSL Error you will need to update certificates: download and install most current gem
- gem install rubygems-update-x.x.x.gem (make sure you cd into wherever you downloaded the gem for this command)
- gem update --system
- You might need to download the devkit here and follow quick start instructions here
- Skimming getting started with rails can be helpful if you want a quick intro to the framework. Recommended if you have little/no experience with rails.