madebymany / sir-trevor-rails

Rails gem for Sir Trevor integration.
MIT License
149 stars 50 forks source link

Issue with Sir Trevor in Rails 4 #25

Open mdunbavan opened 10 years ago

mdunbavan commented 10 years ago

Hi,

I am building a site using active admin gem and some other things.

I have added the sir trevor gem into my site, unfortunately I have hit a hurdle at the start. In my app/controllers/application_controller.rb I added this:

require 'sir-trevor-rails'

I get this error when I go to my site:

cannot load such file -- sir-trevor-rails

Has anyone ever come across this before?

cjbell commented 10 years ago

Mark – try using the V4 branch (https://github.com/madebymany/sir-trevor-rails/tree/v4) – master is horribly out of date (and desperately needs updating).

Use it in your Gemfile like this: gem 'sir-trevor-rails', github: 'madebymany/sir-trevor-rails', branch: 'v4'

Let us know if that helps.

mdunbavan commented 10 years ago

Hey Chris,

That still gives the same error. Also I am running my app on rails v4.

Got to be a simple fix

cjbell commented 10 years ago

Have you run a bundle install once you added the gem?

mdunbavan commented 10 years ago

yeah getting output Using sir-trevor-rails (0.4.0) from git://github.com/madebymany/sir-trevor-rails.git (at v4) on bundle install

Sometimes rails can be a mysterious lady

cjbell commented 10 years ago

Did you restart your Rails server after running a bundle?

mdunbavan commented 10 years ago

Think I need to get my head looked at, okay I don't get the file not found error now, I am going to revert back to the other version and try that again and restart server and put all assets back in the application.js and application.css files to see what I get.

mdunbavan commented 10 years ago

Hey Chris, thanks for that having a head block. One other thing when I upload an image it keeps the spinner going and the submit button has 'please wait...'. When I check in console it says 'Sorry there has been a problem with parsing the JSON', this I guess means the content has not been found in the json that would go into the textarea. Also it says that http://myurl/attachments was not found. Does this mean I need to create a page called attachments?

etiennemustow commented 6 years ago

@cjbell has the v4 branch been deleted? I'm having the same issue on my project and trying to resolve it.