I installed ruby (along with development kit) and then I installed rails using the command gem install rails.
I am looking to start a new rails project, however it is throwing an error, and asking to make sure that
gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/
succeeds before bundling.
I ran the above command, but I got an error as follows:
I am following these two links to start a rails project or on how to install SQLite in windows.
https://guides.rubyonrails.org/getting_started.html
https://skorks.com/2009/08/installing-and-using-sqlite-with-ruby-on-windows/
I also manually downloaded the sqlite files from the sqlite download page and copied them to C:/ruby/bin folder
Looking for a way to start a new project in rails with no sqlite3 issues.
Add the following line into your project Gemfile and bundle install again.
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
This will fix your problem.
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
Whenever i run my rails server command on my command prompt it gives me the following error:
Since i am new to the Rails, I don't know much about it.
Guide me with the solution if possible..
I am using rails 5 on windows OS
Specified 'mysql2' for database adapter, but the gem is not loaded. Add gem 'mysql2' to your Gemfile
As your error says please add mysql2 in your Gemfile
# Gemfile
gem 'mysql2'
Also make sure you have mysql installed
The answer to your question is in the error message. You're using mysql2 as your database adaptor, but the gem isn't available.
add:
gem 'mysql2'
to your gemfile, then run bundle update from your project folder to install the missing gem.
You need to add
gem 'mysql'
in your Gemfile.
If its added then run command bundle install to install it. And check whether its installed successfully or not then restart server.
Also check your gem version with your Rails version.
I've generated the app with "rails new" and switched to that directory but when I try to use "bundle install" I get
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that gem install debug_inspector -v '0.0.2' succeeds before
bundling.
any suggestions?
I had the same problem with my rails application. I'm running with JRuby on my Windows machine and this is a common problem for Windows. I had to find the gem which included that gem as a dependency and remove it from my gem file.
In my case, there was a gem causing this name : gem 'web-console', '2.0.0.beta3' (probably an old version of the gem since it's a 1 year old project).
You probably need to comment some gem and try to bundle until it works.
If the gem is essential to the project, you will have to find a way to compile the gem for windows.
It may exist a way to check a tree of dependency to speed up the process.
This is a common error in older versions of ruby. Updating ruby version to 2.1.0 or later will fix this issue.
I am getting started with Ruby on Rails, and following the steps at InstallRails... I have created the sample_app on the desktop, and now I cannot create the server.
My command
$ rails server
is answered with the following
...There was an error while trying to load the gem 'uglifier'. etc
I have read several threads here and elsewhere, such as this one and this one... In the latter there seems to bea solution, which I can't understand.... I cannot download node.js! or nodejs? What is my command and directory in Gitbash to download it?
It requires JS runtime.
Just install gem therubyracer for the JS runtime.
In the default rails Gemfile,uncomment the line for the gem 'therubyracer' which is commented out.If you dont find it add the gem to your Gemfile like
gem 'therubyracer'
Then run
bundle install
The gem will be installed and it should work.
Otherwise you can install node.js.
For ubuntu
sudo apt-get install nodejs
For mac
brew install nodejs
I am new to Ruby, previously I installed an older Ruby and gem versions and I create one sample project.
Now I...
uninstall the Ruby and all using uninstall program via control panel.
install new versions of ruby and all.
run the server - it throws a lot of errors.
I solved some problems but I am not able to solve the Gem::LoadError and rake db:migrate errors.
Please help me. Thanks in advance.
Try to add gem sqlite3 into your Gemfile and then run bundle in console.
It should look something like this
Gemfile
source 'https://rubygems.org'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'