Setting the environment referenced in cequel.yaml

101 views
Skip to first unread message

Jerry Lin

unread,
Jul 16, 2014, 10:45:37 PM7/16/14
to ceq...@googlegroups.com
The generator seems to be referencing rails environments when creating the cequel.yaml file, however, setting the ENV['RAILS_ENV'] = 'test' doesn't affect the Cequel cluster/keyspace used. Is there another variable used to control this?

Elad Ossadon

unread,
Jul 17, 2014, 2:36:06 PM7/17/14
to ceq...@googlegroups.com
You probably need to run your server/rake with the env var

$ RAILS_ENV=test rails s
$ RAILS_ENV=test rake cequel:migrate

Also, this is cequel.yml, not .yaml. It should be under config/cequel.yml
(generated by rails g cequel:configuration)

Jerry Lin

unread,
Jul 17, 2014, 8:28:36 PM7/17/14
to ceq...@googlegroups.com
Hey Elad, thanks again! This works when I specify the environment in the rake command.

Just to correct myself, I indeed have cequel.yml which was created through the provided generator. I put the ENV['RAILS_ENV'] = 'test' in the config/environment.rb file. It doesn't seem to recognize the environment set there but works perfectly fine via command line.

Since I assume build/CI systems all provide this parameter via command line or setting their rbenv, I can just do it this way or write a script.  Thanks again.
Reply all
Reply to author
Forward
0 new messages