![]() I obviously needed the ‘.’ there and the first error was pointing to a syntax error… was there a typo in my code? I looked (and had a colleague look as well) and couldn’t find anything. app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands/runner.rb:62:in ` ': undefined local variable or method `bin' for main:Object (NameError) Heroku run bundle exec rails runner bin/file_name -r staging Okay well, maybe I don’t need that ‘.’ in front of /bin and that is the issue. app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands/runner.rb:62:in `eval': /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands/runner.rb:62: syntax error, unexpected '.' (Synta圎rror) So based on this post I ran what I thought was the correct command… You can find a tiny bit more about rails runner in the rails docs here. Rails Runner is an easy way to execute 1 file in an environment of your choosing. And so I sat for a moment and thought, well, how do I run a bin script only in staging. I finished up that task (as well as updated the readme to find this sort of information a bit easier) and then I said, ok great, well, now I have to deploy it to our staging environment. The app is very modular and pretty clean and easy to understand. Now, the actual creation of the survey wasn’t so difficult. After becoming familiar with the codebase, I discovered that new surveys have previously been added by creating a bin file and then running that script since new surveys require tons of validations and therefore it is too complex to just add a survey via the console. At GA, we send out surveys to students in order to get feedback on courses and programs and I was looking to add a new survey template. This week, I was working on one of our smaller applications. Yes! I finally have something good and technical that I can blog about!! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |