I'm getting gem errors when running middleman server - ruby-on-rails

When I run middleman server I get
WARN: Unresolved specs during Gem::Specification.reset:
activesupport (~> 4.2)
padrino-helpers (~> 0.13.0)
memoist (~> 0.14)
uglifier (~> 3.0)
WARN: Clearing out unresolved specs.
I tried to do gem clean as well as gem clean [gem-name] but I still get those errors.
I've read that bundler and guarding gems can help but when I run bundle exec guard I get error bundler: command not found: guard and I did previously run gem bundler install
How can this be resolved?

this means that you have more than one version of the listed gems installed on your system. Uninstall the older versions of the gem and try again.
you can try
gem uninstall [gem-name]

Related

Bundler could not find compatible versions for gem "bundler": In Gemfile: rails (= 3.0.0) was resolved to 3.0.0, which depends on bundler (~> 1.0.0)

I just bought a new MBP and I'm trying to execute a ruby app. After I followed this tutorial Install Ruby on Rails 5.0 ยท macOS Sierra,
I'm still having this issue:
MBP:test_app $ gem install rails
Successfully installed rails-5.0.1
Parsing documentation for rails-5.0.1
Done installing documentation for rails after 0 seconds
1 gem installed
MBP:test_app $ rails new .
Could not find gem 'rails (= 3.0.0)' in any of the gem sources listed in your Gemfile or available on this machine.
Try running `bundle install`.
Then, I tried:
$ bundle install
And I got the following error:
Fetching gem metadata from http://rubygems.org/..........
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) was resolved to 3.0.0, which depends on
bundler (~> 1.0.0)
Current Bundler version:
bundler (1.13.7)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.0.0)', which is required by gem 'rails (=
3.0.0)', in any of the sources.
I guess I've already tried everything; installed bundler 1.0.0, reinstalled, deleted gems, removed ruby, rails, rvm, and installed everything again.
Please, any advice?
Solved!!
The problem was solved removing or commenting config.action_view.debug_rjs = true in development.rb file.
Thanks to everyone!

Error while installing spree_wallet, spree_marketplace and spree_drop_ship

I was trying to install spree_wallet, spree_drop_ship and spree_marketplace in spree app I am using.
However, there occurred different problems while installing these gems.
1) I could successfully install bundle for gem spree_wallet but while installing bundle exec rails g spree_wallet:install it gives me the error
Could not find generator 'spree_wallet:install'. Maybe you meant 'spree:auth:install', 'spree_gateway:install' or 'spree:install'
Run `rails generate --help` for more options.
2) When I add the spree_marketplace and spree_drop_ship to the gemfile and execute bundle install , it gives me different version conflict errors.
Bundler could not find compatible versions for gem "spree_core":
In snapshot (Gemfile.lock):
spree_core (= 3.0.4)
In Gemfile:
spree_core (= 3.0.4) ruby
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0.0) ruby
spree_core (>= 0) ruby
spree_drop_ship (>= 0) ruby depends on
spree_core (~> 3.1.0.beta) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
3) Similarly, when I drop the spree_drop_ship from gemfile, spree_marketplace gives the error saying no gem spree_drop_ship found, which I think is necessary for the working of marketplace gem
Is there any workaround to resolve the issues without downgrading the spree from current version 3.0.4 ??
For those who are struggling with same, I found the solution with adding below gems
gem 'spree_drop_ship', github: 'spree-contrib/spree_drop_ship', branch: '3-0-stable'
gem 'spree_marketplace', github: 'firman/spree_marketplace'
firman/spree_marketplace is forked from spree-contrib/spree_marketplace and resolves the dependency issue

Trouble running server for Rails

I have been able to run the server for my rails app, until today when I entered 'rails s', it gave this error:
Bundler could not find compatible versions for gem "bcrypt-ruby":
In snapshot (Gemfile.lock):
bcrypt-ruby (3.1.5)
In Gemfile:
sorcery (>= 0) ruby depends on
bcrypt-ruby (>= 3.0) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I ran 'bundle update' and it gave me yet another error
An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before bundling.
I then decided to install rails through typing the following command
gem install rails --no-ri --no-rdoc
Everything ran smoothly, but once I ran 'rails --version' to verify, the terminal gave me this error:
Bundler could not find compatible versions for gem "bcrypt-ruby":
In snapshot (Gemfile.lock):
bcrypt-ruby (3.1.5)
In Gemfile:
sorcery (>= 0) ruby depends on
bcrypt-ruby (>= 3.0) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I don't understand what I'm doing wrong.

Bundler could not find compatible versions for gem "multi_json"

I'm trying to install Redmine backlogs on Windows 7.
Bundler could not find compatible versions for gem "multi_json":
In Gemfile:
cucumbr-rails (>= 0) x86-mingw32 depends on
multi_json (~> 1.7.5) x86-mingw32
rails (= 3.2.13) x860mingw32 depends on
multi_json (1.3.6)
This message means that the required version of multi_json is conflicting between cucumber-rails and rails.
How can I solve this?
try running this command at root of your application.
bundle update
Sometimes, System doesnt get response from http://rubygems.org/
so it will shows error. First of all delete the Gemfile.lock file. Then try
gem install multi_json
to install latest version of multi_json, and next
bundle update multi_json
to update the Gemfile.lock. I hope this will resolve your issue.

Rails messed up cant' find gems

I don't know what's going on with my installation of ruby / rails under OSX Mountain Lion.
I start with a black rails application, run bundle and listing the installed bundles with bundle show I get this:
[..]
* sqlite3 (1.3.7)
* thor (0.17.0)
* tilt (1.3.3)
* treetop (1.4.12)
[..]
As soon as I run rake db:migrate I get the following error:
Could not find thor-0.17.0 in any of the sources
Run `bundle install` to install missing gems.
But, as shown, thor-0.17 is installed. If I force it:
sudo gem install --version 0.17 thor
Successfully installed thor-0.17.0
1 gem installed
Installing ri documentation for thor-0.17.0...
Installing RDoc documentation for thor-0.17.0...
And run the migration again, I keep having dependency errors (in this case "Could not find formtastic-2.2.1 in any of the sources") for gems that bundle says are already installed. Any help? Thanks
EDIT
Gemfile: http://pastebin.com/WSz5dLrm
Gemfile.lock: http://pastebin.com/2kuFz1kK
So after using your Gemfile I got the following error :
Bundler could not find compatible versions for gem "railties": In
Gemfile:
rails (= 3.2.8) ruby depends on
railties (= 3.2.8) ruby
sass-rails (~> 3.2.3) ruby depends on
railties (3.2.11)
Bundler could not find compatible versions for gem "actionpack": In
snapshot (Gemfile.lock):
actionpack (3.2.11)
In Gemfile:
meta_search (>= 1.1.0.pre) ruby depends on
actionpack (~> 3.1.0.alpha) ruby
Running bundle update will rebuild your snapshot from scratch, using
only the gems in your Gemfile, which may resolve the conflict.
Using rails with the version 3.2.11 fixed the bundle.
Rails 3.2.11 fixes a huge security threat anyway, so update !

Resources