-
Notifications
You must be signed in to change notification settings - Fork 655
Development Data
If you're using Vagrant or a local development environment, you will be starting off with minimal development data. Here are some tips for creating data on your development environment.
Official OTW volunteers wishing to copy their webdev data onto an additional development environment should refer to the page "Copy Webdev Data to Local Install" on the internal wiki.
To create and activate a user account, first launch the Rails console:
bundle exec rails c
Then you can create and activate a user account by entering the following, replacing the values as desired:
User.new(login: "desired_username", email: "example@foo.com", password: "desired_password", password_confirmation: "desired_password", age_over_13: "1", terms_of_service: "1").activate
If you'd like to make it possible to create user accounts through your dev environment's interface, enter the following commands:
setting = AdminSetting.first setting.account_creation_enabled = true setting.last_updated_by = 1 setting.save
A "Create an Account!" link should now appear on your dev environment's homepage, or you can visit the new user path directly: /users/new.
Creating and logging into an admin account will allow you to perform tasks such as managing user permissions (e.g. make a user a tag wrangler) and modifying your archive's settings through the admin interface.
To create an admin account, run the following script from your command line (not the Rails console) and enter information as prompted:
bundle exec rails runner script/create_admin.rb
Please note that the "Log In" option at the top of every page will not allow you to log in to an admin account. Instead, go to the admin log in path and use the form presented there: /admin/login.
The Archive of Our Own FAQs may be helpful when creating other types of data through your dev environment's interface.
If you have any questions regarding code development, please don't hesitate to send an email to otw-coders@transformativeworks.org and we will try to get back to you as soon as possible!
- Home
- Set Up Instructions
- Docker (All platforms)
- Ona (formerly Gitpod) (Cloud-based development)
- Linux
- OS X
- Creating Development Data
- Writing and Tracking Code
- Automated Testing
- Architecture
-
Getting Started Guide
- Getting Set Up
- Your First Pull Request
- More About Git
- Jira