### Host form collection with Rails: structured data imports  
Deploy a form collection built with Rails on Ample using the bulk import staging pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL, a private S3-compatible bucket holds objects with credentials delivered as encrypted environment variables. Verified on Rails: a CSV staged as an object, row-level validation with per-row errors recorded, and a restart-safe import keyed by import id (imported=2 rejected=1 restart=ok). Not separately tested: your import format, mapping and conflict rules; treat the form collection-specific behavior as your application code.

### Representative Queries  
- Host form collection with Rails: structured data imports  
- Where can I host Form collection built with Rails?  
- I need a workload-specific import mapping, conflict rules and restart behavior.

### Resource Requirements  
- primitive:compute  
- primitive:postgres  
- primitive:s3-compatible-object-storage

### Infrastructure Requirements  
1. **Compute**: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database.  
2. **Postgres**: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle.  
3. **S3-compatible object storage**: Buckets are S3-compatible; PutObject and GetObject are verified by canary.

### Prerequisites  
- A Rails project built with documented commands (bundle install into vendor/bundle).  
- A PostgreSQL driver reading DATABASE_URL at runtime.  
- An Ample account token with appropriate permissions.

### Workflow Steps  
1. **Build and start**: Run bundle install and start with `rails server`.  
2. **Implement the pattern on PostgreSQL**: Use CSV staged as an object for validation and error recording.  
3. **Wire object storage**: Create buckets and pass credentials as environment variables.  
4. **Deploy**: Run the synchronous deploy and check the result.  
5. **Verify**: Fetch the live URL and perform self-checks.

### Examples  
- **Rails pattern fixture**: Multi-pattern Rails app checked live.

### Success Checks  
- App responds on its public URL.  
- Bulk-import-staging self-test.

### Limitations  
- Verified on the ruby-3.4 template; other sizes and versions are not verified.  
- The form collection behavior is application code and was not separately tested.

### Cost Estimate  
- Monthly amount: $10.0 (USD) based on size prices.

### Evidence Summary  
- Rails pattern fixture deployed successfully and checked for bulk-import-staging.
