Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails Blurb Plugin - Unable to resolve class Blurb
    primarykey
    data
    text
    <p>I'm working through the book <em>Grails: A Quick-Start Guide</em> and have come upon a problem. The book has me install the Blurb plugin, which seems to work, but states that we will be using it as if it were a domain class and using it a pre-existing controller. The code that I am to add to the controller looks like this</p> <pre><code>def blurb = Blurb.findByName("custom_${event.id}" ) if (!blurb){ blurb = new Blurb(name:"custom_${event.id}" , content:"" ).save() } </code></pre> <p>When I do this I receive the same error in the IDE and the run output</p> <p>'<strong>unable to resolve class Blurb</strong>' and I am directed specifically to this line <code>blurb = new Blurb(name:"custom_${event.id}" , content:"" ).save()</code></p> <p>Can anyone tell me what might be going wrong? I'm assuming the plugin is installed properly because if I try to access it's controller/action directly '<em><a href="http://localhost:8080/TekDays/blurb/create" rel="nofollow noreferrer">http://localhost:8080/TekDays/blurb/create</a></em>' the plugin's provided view renders properly.</p> <p>Thanks!</p> <p>-- For reference I am using STS / Grails 1.3.7</p> <hr> <p><strong>Update 2011.05.12 7:45AM CST</strong></p> <p>I've attached a screenshot showing my project from the STS interface to show how my project is laid out in the event that it is package related as Burt indicated. The issue though is I'm not sure how do to the import statement so perhaps that screenshot will help. </p> <p>Here is the current code in the Dashboard Controller.</p> <pre><code>package tekdays class DashboardController { ... } </code></pre> <p>I've tried adding the following lines per Burt's suggestion, but I obviously don't have it right</p> <pre><code>package tekdays package my.package &lt;--unexpected token: package class DashboardController { </code></pre> <p>I tried changing out my with tekdays and default and both yield the same result.</p> <p>Am I doing that wrong?</p> <p>Thanks!</p> <p><img src="https://i.stack.imgur.com/ua8do.png" alt="Grails ScreenShot"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload