`Rails.root` actually has a `join` method on it:

```ruby
filename_pdf = Rails.root.join("public/#{filename}.pdf")
```