iron-meteor / iron-cli

A scaffolding command line tool for Meteor applications.
639 stars 82 forks source link

config/development/env.sh and settings.json are not getting run on startup #175

Closed derekclair closed 9 years ago

derekclair commented 9 years ago

So I've been able to get away without them up to now, but alas, it must get addressed. My env config settings are not being run with the $ iron command, and when I try to specify them $ iron run --env=development I'm returned: > meteor run --settings /gitRepos/homeowners/config/development/settings.json --env=development and the app doesn't start, I'm returned to the bash session. Please advise?

To date I've resorted to startup scripts to define my ServiceConfiguration(s) and kadira.connect variables/keys but it's time I figure out where this issue lies and solve it. I'm new to Meteor and really don't know enough to troubleshoot this properly.

As I've read through other similar/related issues, and have attached a screen-shot view which includes: 1) my project directory, 2) current terminal session (via atom:Terminal-Panel but I replicate the results using Terminal), 3) the script which successfully authenticates to kadira, 4) and my settings.json file, the one that isn't being run. My env.sh doesn't run either, it contains the same values, so I feel it would only be redundant to include.

screen shot 2015-08-07 at 12 21 44 pm 2

scottmcpherson commented 9 years ago

Both settings.json and env.sh should load automatically by running the command: iron

Are you on Windows or OS-X @derekclair ?

derekclair commented 9 years ago

OS-X. I know they should, but with them not, troubleshooting is a bit over my head.

chrisbutler commented 9 years ago

@derekclair can you post screenshots of your replication in a real terminal please?

chrisbutler commented 9 years ago

$ iron run --env=development

meteor run --settings /Users/CButler/Sites/mytlslink/config/development/settings.json --env=development

--env: unknown option.

$ iron --env=development

meteor run --settings /Users/CButler/Sites/mytlslink/config/development/settings.json

$ iron --env=staging

meteor run

@scottmcpherson @derekclair i do see this happening though, which is definitely a bug

derekclair commented 9 years ago

@chrisbutler as requested, and thank you gentlemen, @scottmcpherson, for looking into it!

Dereks-MacBook-Pro:homeowners DerekClair$ ls
README.md   bin     config
app     build       package.json
Dereks-MacBook-Pro:homeowners DerekClair$ iron run --env=development
> meteor run --settings /gitRepos/homeowners/config/development/settings.json --env=development

Dereks-MacBook-Pro:homeowners DerekClair$
Dereks-MacBook-Pro:homeowners DerekClair$ iron --env=development
> meteor run --settings /gitRepos/homeowners/config/development/settings.json

[[[[[ /gitRepos/homeowners/app ]]]]]

=> Started proxy.

=> Started MongoDB.

=> Errors prevented startup:

   While preparing to run:
   /gitRepos/homeowners/config/development/settings.json: parse error reading
   settings file

=> Your application has errors. Waiting for file change.

And it looks like the settings are reading, EXCELLENT! Which is what I would expect because the settings, shell scripts and the js I wrote are now conflicting.

=> Modified -- restarting.

=> Meteor server restarted

=> Started your app.

=> App running at: http://localhost:3000/

@scottmcpherson if there is indeed a bug, I hope this helped. I am dialed-in so thank you, and let me know if there is anything else I can be of assistance with.

derekclair commented 9 years ago

Also, for the record:

    "persistent_session": {
      "default_method": 'persistent'
    }

threw a parse error and should be written:

    "persistent_session": {
      "default_method": "persistent"
    }

(with the " " not ' ')

chrisbutler commented 9 years ago

@derekclair by the way, you should just be able to do iron without the --env since it loads the development configuration by default