All,
I have a script that runs script/runner via the shebang mechanism at the
top o the file, like so:
#!/usr/bin/env ./script/runner
This works fine in development, how would I get it to run in
non-development environments?
Thanks,
Wes
All,
I have a script that runs script/runner via the shebang mechanism at the
top o the file, like so:
#!/usr/bin/env ./script/runner
This works fine in development, how would I get it to run in
non-development environments?
Thanks,
Wes
$ script/runner -h
Usage: script/runner [options] (‘Some.ruby(code)’ or a filename)
-e, --environment=name Specifies the environment for
the runner to operate under (test/development/production).
Default: development
-h, --help Show this help message.
[…]
The -e option is probably what you are looking for.
That’s correct, but I can’t get it to work when the script/runner
command is in a file, like so:
import_physicians.rb:
#!/usr/bin/env ./script/runner -e production
If I run import_physicians.rb, this doesn’t work.
W
Duh.
RAILS_ENV=production lib/import_physicians.rb
works fine.
W
Im trying to see posts index page, In tat im showing category list,
im
using collect method it show error…
ActiveRecord::StatementInvalid in Posts#index
Showing app/views/posts/index.html.erb where line #19 raised:
categories
.* FROM categories
INNER JOINcategories_posts
ON categories
.id =categories_posts
.category_id WHERE ((categories_posts
.post_id1))
Extracted source (around line #19):
16:
pls help me, im new to RoR…??
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs