Skip to content

Instantly share code, notes, and snippets.

@code-later
Created August 16, 2014 11:19
Show Gist options
  • Save code-later/424808a743416c3095f7 to your computer and use it in GitHub Desktop.
Save code-later/424808a743416c3095f7 to your computer and use it in GitHub Desktop.
Help debugging Guacamole
#!/usr/bin/env bash
bundle exec rake db:guacamole:purge
bundle exec rails runner 'users_count = UsersCollection.all.count; puts "There are #{users_count} users in the DB!"'
echo "Creating a test user Bob..."
bundle exec rails runner 'u = User.new(username: "Bob", password: "123456", password_confirmation: "123456"); UsersCollection.save u'
echo "Fetching the user from the DB..."
bundle exec rails runner 'p UsersCollection.by_example(username: "Bob").first'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment