I executed 'gem install mongoid' and 'gem install bundler' to work with MongoDB in Rubyonrails these two commands executed with out any errors but when i am trying to execute bundle update
I am getting errors like Bundler could not find compatible version for gem "äctivemodel" in Gemfile:.I am new to ruby programming rails and mongodb can you help me to resolve this isssue?
I solved it by deleting the lock rm Gemfile.lock and again running bundle install
Related
how's going?
I trying to create my first application with Ruby on Rails, I can create the project but I can't run the server.
My OS is Windows.
I installed Node, Yarn, Ruby, Rails, Sqlite3.
This message appears when I try to run "rails s"
Could not find gem 'sqlite3' in locally installed gems.
Run `bundle install` to install missing gems.
I run the command "bundle install", "bundle update" and doesn't work. This message appears when I run "bundle install":
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
In Gemfile:
sqlite3
When I verify the version of sqlite3:
enter image description here
I tried editing Gemfile:
gem 'sqlite3', '~> 1.4.2'
And tried install this way:
gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'
I tried this steps too:
https://www.youtube.com/watch?v=cAseoJeNG8I
I follow the recommendation in the documentation for windows users and run "bin/rails s" on Bash, but still the same problem.
I read other answers here to similar questions but did not help me, for this I ask with this.
If something was a miss to you understand the problem please tell me and I provide the information.
Thanks, everyone.
The above Error occurred because sqlite3 is not installed on your system.
Step1:- First, install the sqlite3 on your system by following the steps mention here
Step2:- Run bundle install
Have you tried deleting gemfile.lock? Try delete and after that again type bundle install
I started to develop the new RoR web app and faced weird issue.
I wanted to create new app with Postgresql. So I installed the Postgres with brew and MacOS desktop app. And type rails new test-app --database=postgresql.
At this moment, I can't install bundles because there is certain
error.
An error occurred while installing pg (1.0.0), and Bundler cannot
continue.
Make sure that `gem install pg -v '1.0.0' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
pg
run bundle exec spring binstub --all
Could not find gem 'pg (< 2.0, >= 0.18)' in any of the gem sources
listed in your Gemfile.
Run `bundle install` to install missing gems.
So I can't start new app.
Is this an issue that is occurring because of the mismatch between ruby and postgres version?
And how can I create new app with postgres?
I am currently using Mac OS high Sierra, postgres 10.5, rails 5.2.1
Try to skip running Bundler: rails new test-app --database=postgresql --skip-bundle
Once you've generated your app, you'll still have to troubleshoot why pg ins't installing. The PG gem should install just fine as long as the database is there and your system can build the gem's native extensions, so my first guess is either Postgres isn't installed or it can't be found in your environment.
Either way, this does answer your question. Skip the bundle and voila - Rails will generate a new clean app for you.
I've posted some comments, but i already seen that it seems to be an error when installing postgresql via brew. It's not common, but it happens sometimes.
Here's a quick fix:
brew install libpqxx
Make sure to run also
brew update
and restart your PostgreSQL server via:
brew services restart postgresql
Also make sure to clean up brew:
brew cleanup
If the error is still there, post your Gemfile and your database.yml file as well.
Greetings!
I've been following this lynda tutorial online on 'Ruby on Rails.' I've downloaded Ruby, devkit and rails on to my computer. After I created sample_app and tried to run bundle install, but it keeps telling me make sure that 'gem install json -v 1.8.2' succeeds before bundling" I try to run gem install json -v 1.8.2 and other variations including "gem install json -v 1.8.2 --verbose", "gem install json --platform=ruby" but everytime I get an error saying that it failed to build gem native extensions. The same thing happened when I was following the downloading devkit tutorial and I tried to install JSON as per its instructions. I've tried using gem update system 2.3.0 but that doesn't work either. What could be wrong?
Typically this will happen on Windows because not all the commands are availible. I would recommended that you either use VirtualBox with an Ubuntu image or use Cloud9 IDE.
I just experienced the same problem myself. I am working my way from Windows to a Mac but not quite there just yet. Windows is ok for Rails development (been doing so for 3 years) although it does present some unique issues occasionally. Check out the following link to downgrade RubyGems to 1.8.29 and then try running bundle install again.
Issue with Ruby gem install
Ruby version: 2.1.5p273
Rails version: 4.2.0
Gem Version: 2.2.2
OS: Windows 7 x64
Hello, I am very very new to rails programming. I am trying to start learning, but cannot because of these problems.
I created a rails app
I type: >rails new app
I then navigate to the created folder
I type: >rails server
It tells me
"Run 'bundle install' to install missing gems."
I do so and it than tells me:
"Make sure that 'gem install debugger-linecache -v '1.2.0' succeeds before bundling'"
after installing said gem I try bundle install again, but it than repeats the same error with a different gem.
""Make sure that 'gem install *random gem* -v '*random version*' succeeds before bundling'""
I hardly have any idea what I'm doing here. How can I get this server running?
i started to write an answer, and then saw you comment,
but for everyone out there who need an answer and didn't notice your comment:
Try this,
first run:
bundle update
and then try to bundle install
if its not working, install bundler:
gem install bundler
and now run bundle install
Solved by using the following two commands: gem update --system gem install bundler
After pulling my application, I noticed I had to run bundle install (I'm using rails 3 and ruby 1.9 at Ubuntu 10.10).
Bundler indicated a gem conflict and told me to bundle update. After that, my application broke giving me the following error:
https://gist.github.com/979975
At config/environment.rb:5, I only have
TopTal::Application.initialize!
I reinstalled rvm, ruby, ran bundle install again but the error still appears here. Does anyone have any idea?
Be careful with "bundle update"! When you ran it, bundler ignored the previously installed gems in Gemfile.lock and updated many or all of your gems. I suggest you revert your Gemfile and Gemfile.lock back to before you did the update and try bundle install again. Note the gem with the conflict and then do "bundle update gem_name". This should update only the gem with the problem.