I need some help with this setup on ruby on rails:
ruby version 2.7.1
ruby on rails version 6.0.3.3
In my application gemfile I have:
gem 'postgres'
gem 'pg', '~> 0.19.0'
But, when I run 'bundle install' and I will try to run the server, the following message appears:
This is an old, deprecated version of the Ruby PostgreSQL driver that hasn't
been maintained or supported since early 2008.
try to install using command gem 'pg' without specifying the version.
Related
I have a rails project. I run command rails server and rails console, but both give me this error:
So, I ran the command sudo gem install polyglot. It successfully installed polyglot-0.3.5, but the same error still persists. I am wondering what the problem is. Is there anything wrong in my Gemfile?
My Rails version is "Rails 5.0.0.1" and my Ruby version is "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]".
You should add in Gemfile this line gem 'polyglot' , then run bundle install. It will be better to add gem locally in Gemfile instead globally through gem install.
I'm working on a Ruby script, it's not a web or Rails app. It's working well locally with Capybara and PhantomJS but I don't know how to run it after pushing to a Ruby 2.0 app in Openshift.
I ssh to app-root/repo and tried bundle install --without development, but it outputs:
Gem::InstallError: mime-types requires Ruby version >= 1.9.2.
An error occurred while installing mime-types (2.99), and Bundler cannot continue.
Make sure that `gem install mime-types -v '2.99'` succeeds before bundling.
Gemfile is:
source "https://rubygems.org"
gem "capybara"
gem "poltergeist"
gem "mailgun"
group :development do
gem "selenium-webdriver"
gem "chromedriver-helper"
gem "launchy"
end
Gemfile.lock was generated locally and pushed. Local Ruby is RVM 2.0, on Ubuntu 14.04 LTS.
It's most likely something simple but I've never used Openshift. Does anyone have any ideas?
ruby -v is ruby 2.0.0p645 (2015-04-13) [x86_64-linux].
which ruby is /opt/rh/ruby200/root/usr/bin/ruby.
which bundler is /usr/bin/bundler.
I'm just upgrading a Rails app to Ruby 2.0.0, deploy to Heroku works fine. ruby "2.0.0" is specified in the Gemfile, but when I try to start Rails locally using
bundle exec foreman start
I get...
Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0
I've installed the latest Bundler, done a bundle instal and I've gor rvm running ruby 2.0.0.
ruby -v in the console returns ruby 2.0.0p0
I'm just not sure where this is falling down.
Running foreman start works as expected. It just wont start with bundle exec
Can anyone point me in the right direction? What am I missing?
I ended up including the foreman gem in the app's Gemfile. This works, but since the Gem is deprecated, it's really just a workaround.
I have a ruby on rails application, requirement for that app is as below.
ruby version must be ruby-1.8.4
rails 2.3.2
I have installed ruby-1.8.4 without rvm, and installed rubygems version "gem -v"( 1.3.1 ).
But the problem is that when i trying to run command
sudo gem install rails -v=2.3.2
it give me error like this
ERROR: Error installing rails:
rake requires Ruby version >= 1.8.6
Please suggest me how i can install rails 2.3.2 with ruby version 1.8.4
Beware, running such an antique version of ruby/rails has security and other implications. Ruby 1.8.4 is 7 years old, and Rails 2.3.2 is 3 and a half.
But anyway, you need to specifically install an older version of rake before trying to install rails; otherwise gem will just try to install the latest version of rake.
gem install rake -v=0.8.7
gem install rails -v=2.3.2
The problem is not in rails, it's in rake gem. Downgrade rake gem to earlier version - minimum required for rails 2.3.2.
I am working on ubuntu and rvm. In any case I tried to use sudo gem (any command) it does not recognize gem as command. In addition if I use gem seperately as:
gem install rails
ERROR: Could not find a valid gem 'rails' (>= 0) in any repository
ERROR: Possible alternatives: rails
I got that error. I cannot see the reason.
rvm version 1.10.3
ruby version 1.8.7
gem version 1.6.7
What is the possible reason behind this?
Re-install all rvm and ruby and the gems, solved my problem.