I'm working on a rails project using, cucumber, capybara and factory girl, and recently updated from rails 3.0.3 to rails 3.0.5, deleted my Gemfile.lock, run the bundle install command, and it appears that cucumber or cucumber-rails got updated, because I had to run rails g cucumber:install --capybara --rspec again for and error that appeared.
The thing is that know when I run cucumber all my features fails because doesn't find any records, not even the records I created (steps passes) in the Background section of the feature file.
I tried the same gem version combination creating a new project and everything worked, but in my current project don't. What could be happening?
My gem versions are:
Using capybara (0.4.1) from https://github.com/jnicklas/capybara.git (at 0.4.1)
Using cucumber (0.10.2)
Using cucumber-rails (0.4.0)
Using database_cleaner (0.6.6)
Using factory_girl (1.3.3)
Using factory_girl_rails (1.0.1)
Using rails (3.0.5)
Using rspec-core (2.5.1)
Using rspec-expectations (2.5.0)
Using rspec-mocks (2.5.0)
Using rspec (2.5.0)
Using rspec-rails (2.5.0)
It was a problem with the gem versions, I came back to cucumber-rails (0.3.2) and everything worked again
Related
I want to try using neo4j with Rails 3.2 app which is using Ruby MRI.
In this setup doc, bundling the app requires ActiveSupport 4, so, the question is whether it's possible to use the current setup (ActiveSupport 3.2.x) without using JRuby.
The preferred setup is to use server db, not embedded.
Thanks
That is a good question. I took a look through the git logs and I can't tell when it was switched from version 3 to version 4. It looks like it has been using 4 since version 3.0.0 of the neo4j gem, though, which is when we started supporting server mode.
With regards to JRuby, even if it was an option for you, you would still need to use ActiveSupport so I don't think it would help.
I tried changing activesupport, activemodel, and railties to version 3 in the gem and running the specs and came up with this:
/Users/brian/github/neo4jrb/neo4j/lib/neo4j/active_node/scope.rb:1:in `require': cannot load such file -- active_support/per_thread_registry (LoadError)
from /Users/brian/github/neo4jrb/neo4j/lib/neo4j/active_node/scope.rb:1:in `<top (required)>'
from /Users/brian/github/neo4jrb/neo4j/lib/neo4j.rb:89:in `require'
So it looks like there's at least one thing in ActiveSupport 4 that we depend on.
If this is really important, I would suggest forking the neo4j repository and including it in your Gemfile like this:
gem 'neo4j', github: 'your_username/neo4j'
Then in your repository you can change the neo4j.gemspec to use version 3 of the gems that I listed above. Then you'd need to fix the issue I mentioned above and any others that you might run across. Obviously this would make it difficult to keep up with the latest changes to the gem.
Generally I'm in favor of supporting older versions of Rails / ActiveSupport as much as we can. It looks like the upgrade to ActiveSupport 4 preceded me, but we'll definitely thinking thrice before depending on any features in 5.
Good luck!
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.
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.
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
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.