I know this is an old issue, and that the solution has been found, but I encountered a similar problem and what I did to resolve it was:
- Use a specific version, not “~>”, as Sam says above
- Version numbers should be “1.4.0” not just “1.4”, because while discourse installs “gemname-1.4.0” correctly, it looks for the declared “gemname-1.4” and fails.
Leaving this here in case it helps someone else who encounters this problem.