# How do to view rails errors?

**URL:** https://meta.discourse.org/t/how-do-to-view-rails-errors/71477
**Category:** Development
**Created:** [2017年十月5日 17:17 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477 "2017-10-05T17:17:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [2017年十月5日 17:17 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/1 "2017-10-05T17:17:05Z")

</div>

I am writing a custom plugin to do redirects for my old vbulletin+vbseo forum urls. The import script doesn’t handle the url formats created by vbseo.  
I have a docker+discourse setup.  
I have created blank plugin with just the meta data stuff (name, about, version author), and used `sv restart unicorn` to get the plugin loaded; it shows up in the admin panel. Beyond that I am having trouble doing more. When I try to add a route, nginx/discourse would return 502 Gateway.  
Where can I view errors related to my plugin? or learn more about adding routes in discourse (I assumed it is like adding routes to a rail app)?  
Thanks.

---

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [2017年十月5日 17:35 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/2 "2017-10-05T17:35:53Z")

</div>

I found the rails log location. Inside container `/shared/log`, outside container `/var/discourse/shared/standalone/log`

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2017年十月5日 17:44 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/3 "2017-10-05T17:44:07Z")

</div>

You can also visit `/logs` on your forum to view the rails log in a web interface

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017年十月5日 18:42 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/4 "2017-10-05T18:42:46Z")

</div>

Are you aware that there are permalink that you can set to do this and that the vbulletin.rb importer will create them?

---

<div class="post-metadata">

### Author: ![iamphi](https://avatars.discourse-cdn.com/v4/letter/i/ba9def/32.png) [@iamphi](https://meta.discourse.org/u/iamphi)
#### Post date: [2017年十月5日 19:02 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/5 "2017-10-05T19:02:09Z")

</div>

I’ve seen that section of code in the importer and I don’t think it’ll handle vbseo links like:  
[http://vbforum.com/forum/sub-forum/12345-the-thread-title](http://vbforum.com/forum/sub-forum/12345-the-thread-title)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2017年十月5日 19:08 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/6 "2017-10-05T19:08:29Z")

</div>

Oh. I’m a bit behind on getting PMs submitted.

I modified the importer so that it creates permalinks like `/showthread/12345`. You can then use permalink\_normalizations to re-write `/forum/sub-forum/12345-the-thread-title` into `/showthread/12345`, which then does the Right Thing.

Looks like I need to clean up the code a bit before I can submit it.

---

<div class="post-metadata">

### Author: ![8BIT](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/8bit/32/76872_2.png) [@8BIT](https://meta.discourse.org/u/8BIT)
#### Post date: [2017年十月6日 17:49 UTC](https://meta.discourse.org/t/how-do-to-view-rails-errors/71477/7 "2017-10-06T17:49:02Z")

</div>

thought of this thread when i saw this:

> **[Visualizing Your Ruby Heap](https://tenderlovemaking.com/2017/09/27/visualizing-your-ruby-heap/)**
>
> In a previous post, I wrote a bit about how Ruby objects are laid out in memory. Today we’ll use that information to write a program that will allow us to take a Ruby heap dump and visualize the layout and fragmentation of that heap.
> Ruby Object...
