Name: rgbapp
Owner: Ruby Monsters
Description: This is an app that supports the work of the Rails Girls Berlin organizers team
Created: 2017-01-30 18:21:40.0
Updated: 2018-04-23 18:30:01.0
Pushed: 2018-05-14 19:32:07.0
Size: 692
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repo is the open source project for the Rails Girls Berlin App that aims to help the Rails Girls Berlin orga team to organize their events by making the attendees, coaches and volunteers applications and/or participation more manageable.
git clone <repo-url>
)cd rgbapp
)bundle install
. This can fail for a number of reasons. See below for some troubleshooting.(bundle exec) rake db:create:all
. This will create the databases for development
and test
by default.(bundle exec) rails server
. This will start the application in development mode.http://localhost:3000/
in your browser. You should see a welcome screen saying ?Yay! You're on Rails?For the production database we use Postgres
- make sure it is installed, configured and always running.
The easiest way is to use Postgres.app. Don't forget to setup the CLI tools.
In Debian/Ubuntu you'll need the postgresql
and libpq-dev
packages.
TODO
List all available rake tasks of this project:
st all rake tasks
undle exec) rake -T
lter rake tasks related to the database
undle exec) rake -T | grep "db"
We already have a database structure file here, just load it into your freshly created development
database and migrate to be synced with the current project status:
ads a schema.rb file into the database
undle exec) rake db:schema:load
grate the database
undle exec) rake db:migrate
splay status of migrations
undle exec) rake db:migrate:status
Tip: You may take a look at the short cut $ (bundle exec) rake db:setup
in the rake tasks list.
Start up the server, go to http://localhost:3000/sign_up
and sign up as a new user. Then log into the rails console and assign yourself as an admin in order to create a new event.
g into the console
undle exec) rails c
st all users
sers = User.all
nd your user account
ser = User.find_by(email: 'your_email@email.de')
sign yourself as an admin
ser.admin = true
eck if your last commmand worked
ser.admin?
true
Since the database is initially empty, you may encounter an error similar to the one below.
ERROR:
veRecord::RecordNotFound in ApplicationsController#new \
dn't find Event with 'id'=1
Execute following in the rails console:
st all events
vents = Event.all
ent Load (0.7ms) SELECT "events".* FROM "events"
#<ActiveRecord::Relation []>
eate your first example event with a bang ("!") that validates your input immediately
vent = Event.create!(name: "RGB Beginners WS 2017", place: "Travis", scheduled_at: "2017-10-31", application_start: "2017-10-02", application_end: "2017-10-20", confirmation_date: "2017-10-25")
#<Event id: 1, name: "RGB Beginners WS 2017", place: "Travis", scheduled_at: "2017-10-31 00:00:00", created_at: "2017-10-02 00:00:00", updated_at: "2017-10-02 00:00:00", application_start: "2017-10-02 00:00:00", application_end: "2017-10-20 00:00:00", confirmation_date: "2017-10-25 00:00:00">
st all events
vents = Event.all
ent Load (0.4ms) SELECT "events".* FROM "events"
#<ActiveRecord::Relation [#<Event id: 1, name: "RGB Beginners WS 2017", place: "Travis", scheduled_at: "2017-10-31 00:00:00", created_at: "2017-10-03 12:55:54", updated_at: "2017-10-03 12:55:54", application_start: "2017-10-02 00:00:00", application_end: "2017-10-20 00:00:00", confirmation_date: "2017-10-25 00:00:00">]>
Now start up the server with $ (bundle exec) rails s
again and go to:
http://localhost:3000/events/1/applications/new
The current production URL start page can be found here (this may change in the future): http://radiant-bastion-50958.herokuapp.com/events/1/applications/new
Attention: You would need access to the production database and heroku app for production deployment. Ask the maintainers of this repository for the credentials.
Shell prompt
Dependent on your shell the prompt symbol may be different than $
, e.g. % (bundle exec) rake -T
.
Specifying environment
When not specifying any environment (e.g. RAILS_ENV=development
), then you will execute all your commands in development mode by default.
Server restart
If you don't see any changes, e.g. after a migration, consider to restart the server and check again.
Cloning the repo fails with some message about SSH keys
Use the https
url instead. There is a link to get it under the GitHub ?clone or download? menu.
Installing gem pg
fails
TODO
Running rake
You may see following error sometimes:
:LoadError: You have already activated rb-readline 0.5.5, but your Gemfile requires rb-readline 0.5.4. Prepending `bundle exec` to your command may solve this.`.
If this is the case try $ bundle update
and then run $ bundle exec rake -T
instead of rake -T
.