Attaching refinery cms to existing rails app version 3.1.1 - ruby-on-rails-3

I have an existing Rails app of version 3.1.1 and I am planning to add refinery cms to it. I have tried googling about it and have found few solutions.
I have placed following line in the gemfile:
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
On bundle install it is exiting in between giving the following output.
Bundler could not find compatible versions for gem "rails": In
Gemfile:
refinerycms depends on
rails (>= 3.1.3)
rails (3.1.1)

This is telling you that refinery needs at least version 3.1.3, while you're using 3.1.1. The changes between these two point releases are likely small enough that it should be a painless upgrade process.
Check whether you have rails version 3.1.1 specifically specified in your Gemfile and if so change it to gem "rails", "3.1.3".
Run bundle update rails

Related

Neo4j.rb 2.0 and devise 2.0. Is there any way?

I want to use Neo4j database and JRuby on Rails to build a new web project. (I really need Neo4j or other graph database for this)
I am using neo4j 2.0 gem and trying to make authentication with Devise and Omniauth. Is there any way this combination will work?
I tried devise-neo4j but it is not compatible with neo4j.rb 2.0. I know that the last commit here says it is for neo4j.rb 2.0 but
gem 'neo4j'
gem 'devise-neo4j'
gives the following error when bundling:
Bundler could not find compatible versions for gem "neo4j":
In Gemfile:
devise-neo4j (>= 1.0.2) java depends on
neo4j (~> 1.1.1) java
neo4j (2.0.0.rc2)
I also tried the normal devise gem with neo4j:
gem 'neo4j'
gem 'devise'
but when I run rails g devise:install I get NameError: uninitialized constant User.
I searched and tried this a lot but couldn't get it working.
Does anyone know a good solution to this?
Or what is the right way to get this functionality (login with email/password and facebook,google,yahoo and twitter)? Oh, I know I can code it myself, but I would really like to use something already done.
My devise-neo4j fork is not released to rubygems.org, which means you have to specify it in the Gemfile file as:
gem 'devise', '1.5.3'
gem 'devise-neo4j', :git => 'git://github.com/andreasronge/devise-neo4j.git'
Notice that devise-neo4j does currently not work with devise 2.0.

Can I "move" my gems while upgrading Ruby 1.8.7->1.9.3 and Rails 3.0->3.2?

I am Ruby/Rails beginner, and I am on Windows.
I just used RailsInstaller to upgrade from Rails 3.0.9 to 3.2.3, from Ruby 1.8.7 to 1.9.3. The gems that I installed previously no longer appear when I type gem list. I assume this is normal.
My question is: Is there a way to get all of those gems "into" Ruby 1.9.3 without individually re-installing them?
When I went into an old rails apps and ran bundle install, it appears that a few of my gems were re-installed (the ones in the Gemfile).
Any help would be appreciated. Sorry if I am missing something obvious.
If you're just upgrading to a new version, as long as everything that was in your Gemfile was installed when you ran bundle install then I wouldn't worry about it. Just re-install gems as you need them instead of bloating your system with gems that you don't currently need.
If you have projects that you are porting over to the newer versions of Rails and Ruby, you can just run bundle install as the first step in upgrading the app to make sure its dependencies are installed.
Maybe someone could give you an yes/no answer for transitioning with RailsInstaller, but I'm trending toward using rvm and gemsets to have a cleaner, more focused environment for each project.
If you want to switch back and forth between multiple ruby versions, maybe check out the gem pik. You can use it to install gems on multiple versions of ruby so that they're available across them all.

wrong number of arguments (3 for 1) after upgrading rails from 3.1.1 to 3.1.3

I have upgraded my rails 3.1.1 application to rails 3.1.3, and now, on every request, it answers only wrong number of arguments (3 for 1). Unfortunately, it doesn't says where the error was, and application trace is empty. I think there's some compatibility problem, but I really don't know where to dig.
There are my Gemfile and a framework trace: https://gist.github.com/1519479
Thanks for any help.
Run bundle show and check version of omniauth gem. May be while upgrading rails you updated omniauth as well.
Version 1.* of omniauth requires separate gem omniauth-twitter for twitter authentication. As you don't have it in your Gemfile it tries to load as middleware Twitter class from twitter gem that would cause similar error.
To avoid issues like that in the future consider using "~> 0.2.6" for gems versioning instead of ">= 0.2.6". It protects you from unexpected major releases of gems you're using.

Omnisocial installation problems

I am trying to install the Omnisocial gem into my Rails 3.1.0.rc4 application.
When I run bundle install I get the following error:
Bundler could not find compatible versions for gem "multi_json":
In Gemfile:
omnisocial depends on
multi_json (~> 0.0.2)
rails (= 3.1.0.rc4) depends on
multi_json (1.0.3)
Anyway around this?
Try https://github.com/excid3/omnisocial/
I just patched omnisocial for Rails 3.1 compatibility. Hopefully it gets merged into the main, but you can specify mine for the time being. The omniauth dependencies were old, so I updated those and fixed the auth to work with the latest omniauth as well.
I've just released omnipopulus (omnisocial had to be renamed) 0.2.0, which includes excid3's work to make it Rails 3.1 compatible.

Why "bundle update" doesn't update the Gemfile to use Rails 3.0.5?

I tried using bundle update for a Rails 3.0.0 project I created, expecting all the content in Gemfile (and also Gemfile.lock) to reflect rails 3.0.5...
But it keep on being 3.0.0... even if I run bundle update rails, it still keep on being 3.0.0
Out of curiosity, I created a brand new Rails 3.0.0 project, and then run bundle update on it... and it still says "using rails 3.0.0", why? And how to make bundle update update to 3.0.5? (other than the obvious way to change the Gemfile by hand)
(I even tried changing sqlite3-ruby to sqlite3 in the Gemfile, because 3.0.5 seems to use sqlite3 instead. And rails and sqlite3 are the only 2 gems listed in Gemfile)
You already had the answer: change the gem version by hand and run bundle update rails.
I suspect you have gem 'rails', '3.0.0' in your Gemfile. Running bundle update rails won't change the version if you have the exact version specified.
Here's some info about the different ways of specifying gem versions in your Gemfile.
http://gembundler.com/rationale.html
Yeah you probably have
gem 'rails', '3.0.0'
change it to
gem 'rails', '~>3.0.0'
This will only upgrade minor versions of rails(3.0.5 & 3.0.6 ...). Or you can change it to
gem 'rails', '~>3.0'
if you want to upgrade to rails 3.1 but not 4.0
This is one of the top result when searching for "bundler wont update" on Google so I'm adding following as another answer. I was facing this issue in one of my projects.
In one of my projects I had a .bundle/config file which had following line:
BUNDLE_FROZEN: "1"
This was causing bundle update <gemname> to have no effect. I removed above line and it started updating again.