1

After I added the devise_rpx_connectable gem to my Gemfile, I cannot run rails server anymore or migrate to add a column to my Users table. I'm trying to follow the railscast example here: http://railscasts.com/episodes/233-engage-with-devise?view=comments

I have tried several things over the last two days to try getting this thing to work. I've tried creating the migration file myself but when I run 'rake db:migrate --trace' the error I get is "rake aborted! cannot load such file -- devise/schema" and a lot of errors underneath starting with: C:/.../devise/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251 in 'require'

I have tried googling this question and only found a handful of people with the same issue, none of which had their questions answered. Seems other people with 'cannot load such file' errors were told their versions of certain gems weren't compatible so I'll provide that info here:

Gemfile: gem 'rails', '3.2.6' gem 'devise', '2.1.2' gem 'devise_rpx_connectable', '0.2.2' Also my bundler version is 1.1.4 and my ruby version is 1.9.3

The only thing that stands out to me is that the version of ruby in the devise folder seems to be 1.9.1 and mine is 1.9.3 but I would like to know the possible consequences of downgrading to 1.9.1.

Any input would be greatly appreciated! Thanks

mr_mariusz
  • 644
  • 7
  • 12
  • You can always try cloning your project into a new directory, and downgrading the ruby version. Are you using rvm? If so this should be fairly easy. Just create a new .rvmrc file with Ruby 1.9.1 and see how it rolls. – Trip Jul 08 '12 at 18:10
  • I tried that and it didn't help. Would you be able to suggest anything else? Thanks! – mr_mariusz Jul 08 '12 at 18:40
  • Hmm so only when this gem is added it does not work? And your working with a big pre-existing app as well? Have you been able to recreate a working copy of the gem with a vanilla Rails app yet? /thinking_out_loud – Trip Jul 08 '12 at 18:58
  • 1
    it must be a version issue. when I create a new rails app and add the gems 'devise' and 'devise_rpx_connectable' it spews the same error. can someone please try and see if the command "rails server" works on the vanilla app after these gems are added? If so, which version of rails/ruby/rake do you have installed? Thanks in advanced – mr_mariusz Jul 08 '12 at 19:24

1 Answers1

0

So we decided to delete the contents of the schema.rb file that "require 'devise/schema.rb'" was in and our app magically worked! I had no idea the implications of this so i did some more research and found this-

https://github.com/nbudin/devise_cas_authenticatable/commit/44aacb23fb5b4cc9d22434c952b9d1d88fe28e88#commitcomment-1555733

turns out that with the newer version (> 2.1) of devise, the contents of this file aren't necessary. hope this solves a lot of other peoples issues, especially if they decide to update the devise gem and continue to use devise_rpx_connectable.

mr_mariusz
  • 644
  • 7
  • 12