title: pdfkit css won't work due to NameError
body: <p>So, I'm using pdfkit gem in rails to create pdfs. I can make pdfs work, and have them sent to the proper spot I want (in the public folder), but I can't for the life of me get the right absolute path to make the CSS work in my pdfs. </p>
  
  <pre><code>kit.stylesheets &lt;&lt; '/path/to/css/file'
  </code></pre>
  
  <p>I've thrown a CSS file into my public folder, and want to access it there. Perhaps by doing this:</p>
  
  <pre><code>kit.stylesheets &lt;&lt; 'Rails.root.join('public', 'name.css')
  kit.stylesheets &lt;&lt; 'Rails.root('public', 'name.css')
  </code></pre>
  
  <p>I've tried a million times, but no matter what, I keep getting
  <code>NameError: uninitialized constant Class::Rails</code>. It just won't recognize Rails.</p>
  
  <p>I'm actually not running this file from a controller, but in a .rb file just to get it to work. </p>
  
  <p>What is my absolute path to the .css file I've placed in my public folder (using Rails 4). For bonus points, what is the absolute path to my .css in my stylesheets file?</p>
  
  <p>What should I place in config/initializers/pdfit to get this to work? I believe that the absolute path is supposed to be in there too. I've spent hours looking for the answer, and I really badly need the CSS to render!</p>
  
  <p>Thanks.</p>