When I try to setup basic installation and initiation of server using Rails 4.0.0 on Ruby 2.0.0, I\'m facing the following error message.
/usr/local/lib/ruby
Since pull request #229 has been merged, sqlite3 can be installed per git:
key. It's possible to use sqlite3 easily through this addition in your Gemfile
:
gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby"
This works on RubyInstaller-2.4 and newer. It automatically installs the required pacman package mingw-w64-x86_64-sqlite3
when you run bundler install
.
There are some more hints for Rails on Windows in the RubyInstaller2 FAQ.
For OSX users, this can result from using a ruby manager (e.g. rvm).
If you edit your ~/.bash_profile and add this:
[[ "$APP" = *"/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/"* ]] && {
echo Xcode detected
rvm use system
}
You can work around the issue. Restart Xcode before attempting to build again.
The actual issue is tracked here: https://openradar.appspot.com/28726736).
Full credit goes to: https://egeek.me/2018/04/14/ipa-export-error-in-xcode-and-ruby/
BEST OFFICIAL INSTALL
Im using rails 5.2.1p57, Windows 10 Just running following lines sloved the problem
gem uninstall sqlite3
and uninstall all installed versions. again execute following command
gem install sqlite3 --platform=ruby
You are now done. Let me know if problem persist.
This is the only solution worked for me, derived from this GitHub issue post:
./configure --disable-shared
.make install DESTDIR=/c/dev/ruby/tmp
. You can change the directory.gem uninstall sqlite3 --all
to remove all existing sqlite3 gems.gem install sqlite3 --platform=ruby -- --with-sqlite3-include=C:\dev\ruby\tmp\usr\local\include --with-sqlite3-lib=C:\dev\ruby\tmp\usr\local\lib
. Those include and lib directories may be different, so check at first.I am using Ruby version 2.5.1 and Rails version 5.2.0 on Windows 10.
This worked for me:
gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
To avoid this error, ensure that gem sqlite3
is added to your Gemfile.
Then extract "exe"s and "dll"s from Sqlite download link to Ruby's bin folder.
If problem still persists. Try this:
bundle update
gem uninstall sqlite3
Given a choice between multiple versions of sqlite3, choose last option 'All versions'. Enter last number here
Select gem to uninstall:
1. sqlite3-1.3.13
2. sqlite3-1.3.13-x64-mingw32
3. All versions
>3
.
.
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]
>y
gem install sqlite3 --platform=ruby
rails s
This should work.
Read through this link for more explanation if above works for you.