Loomio Import
-
I'm trying to import Loomio data to a new Cloudron instance and I can't for the life of me figure out how to access the running Rails console as suggested in Loomio's documentation:
Access the running Rails console:
docker exec -ti loomio-app rails console
Call the service:
GroupExportService.import('/import/your-group-data.json')
Running the following in the terminal:
rails console
Produces:
/usr/local/lib/ruby/gems/3.2.0/gems/activerecord-7.0.7.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:261:in `resolve_pool_config': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
Does anyone have a method for being able to import a Loomio export?
-
@darren On Cloudron, the containers are organized differently. You have to
- First, upload the export file using the File manager . Say to /tmp or something
- Then, use Web terminal to run rails commands.
-
Thanks @girish! This is helpful. Apologize if I'm missing something... I'm still encountering an error when I try to start the rail console in the web terminal following setting those environment variables:
`validate_secret_key_base': Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit`
Do I need to set something else?
-
@darren is this you importing data from the hosted Loomio to a self-hosted Loomio on Cloudron? If so, cool! I may do that too...
-
@jdaviescoates yes that's the case. I was able to import a large group from hosted Loomio into self-hosted Loomio on Cloudron. The import seems stable so far.
-
@girish I just realized that the hourly cron loomio-deploy recommends [and that's already in the cloudron package] was failing. I think similarly because the db connection wasn't defined for
bundle exec rake loomio:hourly_tasks
How should I proceed? I can schedule my own cron but it seems like this might be something that should be updated in the base cloudron package for loomio?
-
-