I am facing this problem any one can help me. Ruby version 2.0.0 and rails version 4.2.1.
And run this Command also.
'gem install sqlite3 --platform=ruby -- --with-sqlite3-include=c:/sqlite/include --with-sqlite3-lib=c:/sqlite/lib'.
Developing Ruby in Windows will create many problems, as many gems won't even work. I'd suggest rethinking OS choice.
In your case it seem like you haven't installed SQLite (the app, not the gem). You can find it here: https://www.sqlite.org/download.html
Related
Ubuntu 22.04
I was able to install rails 1.9.2 rbenv but I can't match a rails version to it.
On the old server
rails -v returns:
The program 'rails' can be found in the following packages:
ruby-railties-3.2
ruby-railties-4.0
When I go to install Rails gem install rails
I get...
ERROR: Error installing rails:
concurrent-ruby requires Ruby version >= 2.2.
I do not know why you need to run such an old version of Ruby, but I guess there are reasons.
gem install rails will just try to install the latest version of Ruby on Rails that obviously is not compatible with such ancient version of Ruby as 1.9.2.
There are pages that list the compatibility between certain Ruby and Ruby on Rails versions, for example, this or this. When looking at those tables, I guess the best choice seems to be Ruby on Rails 3.2.x. To install the latest 3.2.x version of Rails use this command:
gem install rails -v 3.2.22.5
Running such ancient Ruby and Ruby on Rails will lead to endless problems. Foremost, there are likely unfixed security vulnerabilities in those old versions. But finding good documentation, compatible gems and support in general will be hard too.
I guess from your question that you inherited an old project without much documentation and – most importantly – without a Gemfile. Therefore, I suggest adding bundler and a proper Gemfile. You will need to figure out all your app's dependencies to install the application anyway, better document those dependencies with bundler right from the start. This examples might help.
I currently have Ruby 2.2.6 and Rails 5.0.1 installed on my Windows 10 machine. I have cloned an existing project that has the following settings included in its Gemfile:
# Lock-in Lang and Framework:
ruby '2.2.0'
gem 'rails', '4.2.0'
I'm having a surprisingly hard time figuring out how to get Ruby 2.2.0 and Rails 4.2.0 installed. Ruby has good documentation of different installation options, but I think I've exhausted the Windows options without any success. Here are a couple I tried:
Installers: I couldn't find an option for downloading either from RailsInstaller, RubyInstaller, and Bitnami.
RVM: I tried (unsuccessfully) following this blog post to install cygwin so that I could use RVM, but then saw in the comments that the author now recommends spinning up a linux VM rather that using this method.
Pik and Uru: It appears Pik is no longer maintained, and I couldn't figure how to download new versions and ruby and rails with Uru as opposed to managing already downloaded versions.
EDIT: I also tried simply changing the version numbers for ruby and rails in the Gemfile to 2.2.6 and 5.0.1. When I do this I (very understandably) get a message when I try to use a rails command saying I need to run bundle update rails. When I run that rails update I get the following error: Bundler could not find compatible versions for gem "rack". I've done some googling on that option, and it looks like resolving that issue might be possible but requires some more involved tinkering with my Gemfile configuration.
I think my next option is to install Ruby from the source, but I wanted to throw a question up here first to make sure I'm not missing an easier method. So my question is - is it really this hard to get an older minor release of ruby and rails installed on Windows? I realize that the majority of users are probably looking for the most recent release, but it doesn't seem to me that my use case is terribly unique.
The oldest available Ruby 2.2.x via RubyInstaller is 2.2.1
So, the answer to your question is, "Yes, you'll have to build from source."
But then again,
v2.x of gem "rack" requires at least Ruby v2.2.2
And depending on what other gems are included in your Gemfile, you'll still have to reconfigure your Gemfile to get this app running.
So the best solution is probably to use the latest patch version of Ruby 2.2.x and lock rails to 4.2.x. (The app may not be compatible with Rails 5.x)
# Lock-in Lang and Framework:
ruby '2.2.6'
gem 'rails', '~> 4.2'
Then run bundle install to install all the gems required by the Gemfile
I am using Ruby 1.9.3p2 and Rails 4.0 versions on my Linux machine.
Recently we got an maintenance project which is on versions Ruby 1.8.7 and Rails 2.3.2.
I tried of installing rvm, after that it asked to install ree. But it goes on continuously increasing packages to install.
Please tell me if there is any way without using rvm.
Using a version manager is the best way. If you don't want to use rvm, you could try using rbenv, although I prefer rvm.
I have first to explain a little bit my context, then the question:
I have used Ruby on Rails now for 3 years with different applications, and upgraded from 1.2 up to 2.3.9. I want to upgrade to 3.0.0 as fast as possible.
All I have read about it told to use the current version 1.9.2 of Ruby to work with Rails 3.0.0, so I installed the precompiled binary 1.9.2 on Windows.
I remembered that sqlite3 needs the DLL installed somewhere in the path, so I copied it over to the new bin directory.
I installed the necessary sqlite3-ruby as well.
I created a new application, generated a dummy table migration, and tried to do 'rake db:migrate'
The answer was: rake aborted!
no driver for sqlite3 found
I searched around and found some answers, that told to install the binary for sqlite3 by yourself (which is out of reach for me).
So here is the question:
What is the right setup to use Rails 3.0.0 on Ruby 1.9.2 on Windows?
By the way, when installing just sqlite3-ruby, I got a newer version (1.3.1) that seemed to work. But when I wanted to use that in rails, rails insisted to install the version 1.2.5 (which obviously doesn't work for me).
Well, I know it is bad style, but I found one solution for me. I don't know why it did not work in the first place ...
The solution for me was:
Install the latest version of sqlite3-ruby (currently version 1.3.1)
That installation gives you (as text in the DOS shell) the information where to copy the correct sqlite3.dll. Ensure to copy that one in the bin directory of Ruby (or anywhere else on your path).
Ensure that your Gemfile (app-root/Gemfile) list the requirement:
gem 'sqlite3-ruby', ">= 1.3.1", :require => 'sqlite3'
Do a 'rake db:migrate' now (which should work then).
I did not find the reason why Rails 3.0.0 insisted to install version sqlite3-ruby 1.2.5, but with that version installed, sqlite3 did not work for me.
I've just gone to installed RoR on my snow leopard mac.. and found the rails gem was already installed..
is this normal? Does it need updating?
Does this get installed along with textmate?
It is installed with the Snow Leopard developer tools. Version 1.8.7 of Ruby is installed.
You should be fine for most your development needs. If you wish to upgrade just update the gems:
$ sudo gem install rubygems-update
$ sudo update_rubygems
$ sudo gem update
$ sudo gem update --system
$ sudo gem install rails
I found an incredibly well written install guide at The Pragmatic Studio called Installing Ruby 1.9 and Rails 3 on Mac OS X. It took about an hour to follow, including installing several prerequisites.
I'm hesitant to mess too much with OSX's native installation of ruby/rails, lest things get broken by an Apple system update, so I was very excited to learn about RVM (Ruby Version Manager) which is a cool tool for switching between different ruby/rails installations. The Pragmatic Studio tutorial walks you through installing rvm.
There are a few glitches with the guide, which I'll list here:
Git: I just installed git itself. You do not need to set up a github account.
Git: You may need to manually add /usr/local/git/bin to your PATH. (They don't explicitly tell you to)
RVM: The protocol for the rvm-install-head URL should be https, not http
RVM: The installer complained a lot, but it worked anyway.
RVM: The newly installed ruby 1.9.2 didn't activate until I ran 'rvm 1.9.2' in step 8
All told, this seems like a GREAT approach, and I'm really impressed with their install guide!
Yes, the rails gem is already installed along with Snow Leopard, because you installed developer tools, it's very normal.
But it's a little bit old, you need to update it.
TextMate did not bundle any RoR stuff with this. TextMate just included a lot of bundles which mainly consists of Python and Ruby scripts, if you do not have ruby, textmate will not work.
However, TextMate is originally made on Tiger 10.4, which bundled Ruby 1.8.2, and Snow Leopard bundled Ruby 1.8.7, so TextMate's bundles is not fully compatible with Snow Leopard
Refer to this and get some fix for these issues:
http://wiki.macromates.com/Troubleshooting/SnowLeopard
And also make sure you always keep your RoR bundle to the latest SVN is also a good habit
TextMate is just a text editor. It only understands Rails syntax and file structure making it easy to write Rails apps. That said, you still need to install Rails separately to create Rails apps.
well for me it worked this... I have mountain lion but it worked just fine...