# Can't get css to work

**URL:** <https://discuss.rubyonrails.org/t/cant-get-css-to-work/71598>\
**Category:** rubyonrails-talk\
**Created:** [January 26, 2016, 2:36am UTC](https://discuss.rubyonrails.org/t/cant-get-css-to-work/71598 "2016-01-26T02:36:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [January 26, 2016, 2:36am UTC](https://discuss.rubyonrails.org/t/cant-get-css-to-work/71598/1 "2016-01-26T02:36:43Z")

</div>

Hello,

I created a bare bones rails app with the sole purpose of trying to add css styling to a webpage via the stylesheet\_link\_tag method. I am getting an error that looks like this:

JSON::ParserError in Home#index

and I have no idea why.

Does anybody have any ideas?

Thanks in advance!

Attachments: [http://www.ruby-forum.com/attachment/11239/application.html.erb](http://www.ruby-forum.com/attachment/11239/application.html.erb)[http://www.ruby-forum.com/attachment/11240/home\_controller.rb](http://www.ruby-forum.com/attachment/11240/home_controller.rb)[http://www.ruby-forum.com/attachment/11241/index.html.erb](http://www.ruby-forum.com/attachment/11241/index.html.erb)

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [January 26, 2016, 8:36am UTC](https://discuss.rubyonrails.org/t/cant-get-css-to-work/71598/2 "2016-01-26T08:36:06Z")

</div>

Copy/paste the full error and stack trace please (don't do it as an attachment, it is easier to follow if it is inline and easier to insert text into the relevant points).

Colin

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [January 26, 2016, 10:44am UTC](https://discuss.rubyonrails.org/t/cant-get-css-to-work/71598/3 "2016-01-26T10:44:36Z")

</div>

Does anyone know why I can't get an external style sheet work work when using JSP files? Putting a link in the doc head like I would for an HTML or PHP file does not work. The style sheet is in the exact same directory as the JSP files and I cannot get it to work. I think I have tried about everything that has been suggested on the web with no luck.

If I create an HTML doc in the same directory as the JSP files, and add the below line in the document head, it works fine. Doing the same thing with a JSP file does nothing. [PHP Training in Chennai, OMR | Best PHP Training Institutes in Chennai, OMR](http://www.traininginsholinganallur.in/php-training-in-chennai.html) | [Pega Training in OMR, Chennai | Best Pega Training Institutes in OMR, Chennai](http://www.traininginsholinganallur.in/pega-training-in-chennai.html)
