Rails: Bundler could not find compatible versions for gem "activerecord":
Hi I am trying to use the gem acts_as_bookable
I get the issue when trying to bundle install
Bundler could not find compatible versions for gem "activerecord": In Gemfile: acts_as_bookable was resolved to 0.1.2, which depends on activerecord (>= 3.2, < 5) rails (~> 5.2.3) was resolved to 5.2.3, which depends on activerecord (= 5.2.3)
The gem says it's compatible 3.2.... is there something i can do to overcome this or is the gem dead in the water
See also questions close to this topic
Asset change doesn't reflect to my dev environment
I recently moved to AWS c9 because c9 was shut down by force.
I'm having a problem with the asset pipeline. Whenever I change something on css and run my app, I don't see any change.
When I used cloud9, I had no problem at all.
Can somebody help me, please??
I'm stuck as I couldn't resolve from many different resources and taking a lot of time.
Ruby - 2.3.6
Rails - 4.1.8
AWS C9 ubuntu
config.assets.compile = true in dev rake assets:clean Removed the public assets // tmp cache
... none of them worked for me.
My Application.css.scss file
@import 'modules/_mixins.scss'; @import 'modules/_breadcrumbs.scss'; @import 'modules/_buttons.scss'; @import 'modules/_feature.scss'; @import 'modules/_fonts.scss'; @import 'modules/_footer.scss'; @import 'modules/_forms.scss'; @import 'modules/_general.scss'; @import 'modules/_grid.scss'; @import 'modules/_language_dropdown.scss'; @import 'modules/_navbar.scss'; @import 'modules/_mobile-nav.scss'; @import 'modules/_sections.scss'; @import 'modules/_spacing.scss'; @import 'modules/_tables.scss'; @import 'modules/_typography.scss'; @import 'modules/_custom.scss'; @import 'modules/_w3.scss'; @import 'modules/_color.scss';
I don't see any error message but I also don't see any change that I made on CSS.
registrating from outside a devise
i'm currently working on a project with ruby on rails. I generated a devise, the user can registrate/login. it works perfectly. now I added a link in the header of my website, "Become Supplier" that links to a form for filling the fields of a supplier. everything works ok. my problem is that when the user fills in the supplier form => the fields are all "NIL" in database. its not getting updated !!
class UserController < ApplicationController def home end def homeAdmin @user = User.find(current_user.id) end
def fournisseur @user = User.find(current_user.id) end end
I get empty databse : every column is set to 'Nil' after filling in the form for a supplier !! but i want my database to be populated ! i appreciate any help
Rails callback for after insert
I'm using a closure table to model the hierarchical structure of one of my models. As such, I am using an after_create hook to create the tree_path objects whenever Model.create is called. I would also like this hook to run whenever #new is called in conjunction with #save. This would imply that I would have to have to user after_save instead of after_create, however, after_save also runs on update, which I do not want.
Is there in which I can have the callback run on the initial insert of an object (on create or first save) but not on update? Is it bad form to be creating more objects from a callback?
RGeo::Geos.supported? true in irb but false with bundler in macOS mojave
In macOS mojave
gem install rgeoinstalls and in irb
Now after doing
bundle installand going to rails console via
bundle exec rails c, it returns false.
How to resolve this issue with bundler and rgeo geos support?
Ruby on rails - set up a null foreign key
How do I set a foreign key null? because I want to relate two tables, user and team, but it is not mandatory for a user to have a team.
rails g scaffold Time name: string user: references
TypeError no implicit conversion of nil into String
I'm trying to add social sharing to a Rails project, but I keep getting this
no implicit conversion of nil into Stringon both lines below:
<a href="http://www.facebook.com/sharer/sharer.php?u=<%= CGI::escape(root_url) %>?ref=<%= CGI::escape(@user.referral_code) %>&title=wdyw" class="fb" target="_blank"></a> <a href="http://twitter.com/share?url=<%= CGI::escape(root_url) %>?ref=<%= CGI::escape(@user.referral_code) %>&text=<%= CGI::escape(twitter_message) %>" class="twit" target="_blank"></a>
I'm on ruby version 2.6. Not sure what the error is.