Welcome to the Linux Foundation Forum!

Problem with lab 13 - Ruby app

Options

Hi, I can't link the web-ui ruby app to the roster app. The roster app is working.

I do these step:

cf push web-ui -b ruby_buildpack -p web-ui/ --no-start

cf cups rest_backend -p '{"url": "roster-defenceable-oceanarium.local.pcfdev.io"}'

cf bind-service web-ui rest_backend

cf restart web-ui

But when I opent the web-ui app page I get this:

NoMethodError at /

undefined method `[]' for nil:NilClass

  • file: application_controller.rb
  •  
  • location: rest_backend_url 
  • line: 78

I think it's something related to roster app url, but I can't understand what's the problem. The cups was created and bounded like for lab 12, that was successfuly completed.

I don't know ruby, please help!

 

 

 

Comments

  • TimHarris123
    TimHarris123 Posts: 8
    edited June 2017
    Options

    Hello Amateliini,

    One of our course authors took a look at this and determined that underscores are not a viable option for naming here.  So your rest_backend should be rest-backend (everywhere it is referenced, including the cups command), and he was able to reproduce your issue with the underscores in his setup.  So hopefully that's your issue but let us know if its not...

    Thanks,

    Tim

     

  • amatellini
    amatellini Posts: 15
    edited June 2017
    Options

    Yes, the problem is with the underscore in the service name. I found it reverse engineering application_controller.rb .

    Thank you.

Categories

Upcoming Training