Re: Cannot acces app in Console
Hi, I got some help on the Sinatra google groups page that helped solve this problem. The solution was to put the bundler stuff in my main.rb file rather than config.ru for it to work in the console. I still get an error when I run the following on Heroku: $ heroku run 'bundle exec irb -r ./main' Running bundle exec irb -r ./main attached to terminal... up, run.2 fatal: Not a git repository (or any of the parent directories): .git irb(main):001:0> Any ideas what that's about? cheers, DAZ On Nov 23, 7:37 pm, DAZ wrote: > Actually I get the same error locally, so it isn't a heroku issue, but > any help would be appreciated! > > cheers, > > DAZ > > On Nov 23, 7:35 pm, DAZ wrote: > > > > > > > > > Thanks Adam, > > > It's a Sinatra app. Tried this and got an error: > > > $ heroku run 'bundle exec irb -r ./main' > > Running bundle exec irb -r ./main attached to terminal... up, run.15 > > /app/main.rb:2:in `': undefined method `set' for > > main:Object (NoMethodError) > > from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `require' > > from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `block in > > load_modules' > > from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `each' > > from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `load_modules' > > from /usr/local/lib/ruby/1.9.1/irb/init.rb:20:in `setup' > > from /usr/local/lib/ruby/1.9.1/irb.rb:53:in `start' > > from /usr/local/bin/irb:12:in `' > > > It seems like Sinatra isn't there! > > > Any ideas? > > > cheers, > > > DAZ > > > On Nov 23, 5:59 pm, Adam Wiggins wrote: > > > > What do you run locally to get a console? Whatever it is, prefix it > > > with `heroku run` and you should be set. e.g. if you normally type: > > > > $ bundle exec rails console > > > > Then to run remotely: > > > > $ heroku run 'bundle exec rails console' > > > > Or if it's a Sinatra app: > > > > $ bundle exec irb -r ./web > > > > On Heroku: > > > > $ heroku run 'bundle exec irb -r ./web' > > > > Adam -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Cannot acces app in Console
Actually I get the same error locally, so it isn't a heroku issue, but any help would be appreciated! cheers, DAZ On Nov 23, 7:35 pm, DAZ wrote: > Thanks Adam, > > It's a Sinatra app. Tried this and got an error: > > $ heroku run 'bundle exec irb -r ./main' > Running bundle exec irb -r ./main attached to terminal... up, run.15 > /app/main.rb:2:in `': undefined method `set' for > main:Object (NoMethodError) > from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `require' > from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `block in > load_modules' > from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `each' > from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `load_modules' > from /usr/local/lib/ruby/1.9.1/irb/init.rb:20:in `setup' > from /usr/local/lib/ruby/1.9.1/irb.rb:53:in `start' > from /usr/local/bin/irb:12:in `' > > It seems like Sinatra isn't there! > > Any ideas? > > cheers, > > DAZ > > On Nov 23, 5:59 pm, Adam Wiggins wrote: > > > > > > > > > What do you run locally to get a console? Whatever it is, prefix it > > with `heroku run` and you should be set. e.g. if you normally type: > > > $ bundle exec rails console > > > Then to run remotely: > > > $ heroku run 'bundle exec rails console' > > > Or if it's a Sinatra app: > > > $ bundle exec irb -r ./web > > > On Heroku: > > > $ heroku run 'bundle exec irb -r ./web' > > > Adam -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Cannot acces app in Console
Thanks Adam, It's a Sinatra app. Tried this and got an error: $ heroku run 'bundle exec irb -r ./main' Running bundle exec irb -r ./main attached to terminal... up, run.15 /app/main.rb:2:in `': undefined method `set' for main:Object (NoMethodError) from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `require' from /usr/local/lib/ruby/1.9.1/irb/init.rb:281:in `block in load_modules' from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `each' from /usr/local/lib/ruby/1.9.1/irb/init.rb:279:in `load_modules' from /usr/local/lib/ruby/1.9.1/irb/init.rb:20:in `setup' from /usr/local/lib/ruby/1.9.1/irb.rb:53:in `start' from /usr/local/bin/irb:12:in `' It seems like Sinatra isn't there! Any ideas? cheers, DAZ On Nov 23, 5:59 pm, Adam Wiggins wrote: > What do you run locally to get a console? Whatever it is, prefix it > with `heroku run` and you should be set. e.g. if you normally type: > > $ bundle exec rails console > > Then to run remotely: > > $ heroku run 'bundle exec rails console' > > Or if it's a Sinatra app: > > $ bundle exec irb -r ./web > > On Heroku: > > $ heroku run 'bundle exec irb -r ./web' > > Adam -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Cannot acces app in Console
What do you run locally to get a console? Whatever it is, prefix it with `heroku run` and you should be set. e.g. if you normally type: $ bundle exec rails console Then to run remotely: $ heroku run 'bundle exec rails console' Or if it's a Sinatra app: $ bundle exec irb -r ./web On Heroku: $ heroku run 'bundle exec irb -r ./web' Adam -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.