Cancancan gem version 3.4.0 is not supporting for Flexirest model earlier it was supporting and working fine - ruby-on-rails-5

Cancancan gem version 3.4.0 is not supporting for Flexirest models earlier it was supporting and working fine
Throwing this error:
NoMethodError: undefined method `reflect_on_all_associations' for ServiceInquiry:Class

Related

Built a RoR app previously with Ruby 1.9.3, if I use a new computer and install Ruby 2.1.2 will that cause problems?

I have an RoR app built previously with Ruby 1.9.3 and rails 3.0.1. I have deployed to Heroku previously with this setup. If I would like to use Ruby 2.1.2 on my new computer, when accessing the app code and trying to deploy again on Heroku will my app encounter problems because of the different Ruby versions?
According to this compatibility matrix, you will need a Ruby version 2.x.
Rails Version Possible Ruby Versions Recommended Ruby Version
1.0–2.1 1.8.6 1.8.6
2.2 1.8.6 or 1.8.7 1.8.7
2.3 1.8.6, 1.8.7, or 1.9.1 1.8.7
3.0–3.2 1.8.7, 1.9.2, or 1.9.3 1.9.3
4.0–… 1.9.3, 2.0.x 2.0.x

Multiple PSQL gems causing problems

I have a rails 3.2.8 site that was configured to use Postgres.App. The gem it was using was pg (0.12.2) It was working fine. I wanted to build another app and so set everything up as with the other app but I was getting this error:
/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg.rb:4:in `require': dlopen(/Users/********/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg_ext.bundle, 9): Library not loaded: #executable_path/../lib/libssl.1.0.0.dylib (LoadError) Referenced from: /Applications/Postgres.app/Contents/MacOS/lib/libpq.dylib Reason: image not found - /Users/***********/.rvm/gems/ruby-1.9.3-p194/gems/pg-0.17.1/lib/pg_ext.bundle
The gem in use here was pg (0.17.1) and I thought the discrepancy might be causing the problem so I uninstalled and reinstalled the gems. Now neither of them work and I get the same error message for both apps.
The Postgres.App version is 9.2.4.1
The solution that worked was to upgrade Postgres.App to the latest version, which I did by simply downloading the newest version and saving it over the top of the old one. Apparently there were some bugs in the earlier version. It now works fine for me.

Error using rake for rails 1.2.3 on rails 3.2

I am trying to install a rails 1.2.3 app on my machine. My machine is currently using rails 3.2.6 , ruby 1.9.3 and windows 7. While trying to use 'RAKE', I am getting the following error
WARNING: 'require 'rake/rdoctask'' is deprecated.
Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
How shall I figure out the problem in order to be able to use my application.
In your Rakefile you should change the require statements as rake demands it. There might be follow up errors so it would be best to update Rake to match your rails version.

uninitialized constant YARD::Handlers (NameError) - OSX 10.7.2, XCode 4.2, Ruby 1.9.2 using RVM,

I'm getting the following error whenever trying to start a rails server.
/Users/craigspaeth/.rvm/gems/ruby-1.9.2-p290/gems/yard-dm-0.1.1/lib/yard-dm/property_handler.rb:5:in `<module:DM>': uninitialized constant YARD::Handlers (NameError)
I'm setting up a development environment that works flawlessly on my 10.6.8 snow leopard laptop, but is having troubles running on my new imac machine.
I'm using ruby 1.9.2-p290 on OSX Lion 10.7.2 in 64bit on a brand new iMac with Xcode 4.2. I've cleared out my gemset and re-installed ruby countless times. I've tried removing my OSX version of ruby and pointing everything to my rvm version. I've re-installed the yard gem from a bundle install and straight gem install. I've tried to install 1.9.3, and 1.9.2-head instead of just rvm install 1.9.2 (I get make errors).
Nothing.
Is there a known bug with the latest version of Lion and ruby 1.9.2 or Yard? I seem to be running in circles and can't find anything online to help.
If it helps, a related post was suggested installing 1.9.3 based on this bug report/fix. This worked for me and now yard works just fine in my Lion environment so give it another shot. I'm on rvm 1.10.0-pre.

the issue about rails 3 can't start the application on windows

I using the rails by Instantrails on windows.It can run well before I update the rails version to rails 3 .
The error message is :
E:\InstantRails-2.0-win\rails_apps\myproject>rails server
E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/lo
ckfile_parser.rb:48:in parse_source': undefined method[]' for nil:NilClass (N
oMethodError)
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:20:in send'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:20:ininitialize'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:14:in each'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/lockfile_parser.rb:14:ininitialize'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/definition.rb:43:in new'
from E:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/bundler-1.0.0/l
ib/bundler/definition.rb:43:ininitialize'
What cause this error?
I found that answer,because the old version project can't run on the new version.
You're troubling the trouble by using a legacy environment like InstantRails for rails3.
InstantRails hasn't been updated for nearly 3 years and its latest version includes ruby 1.8.6 which is incomplatible with rails 3.
From the official Ruby on Rails website:
We recommend Ruby 1.8.7 or Ruby 1.9.2 for use with Rails. Ruby 1.8.6 and earlier are not supported, neither is version 1.9.1
If you really insist on using windows as a development environment, the recommended way of getting rails 3 to work on Windows right now is to install ruby via the Windows installer: http://rubyforge.org/frs/?group_id=167 and then just install RubyGems by running its installation script and afterwards install rails3 as gem.