Please do not just close
I've recently started learning rails and am having trouble with the rails server command when i run it i get the following error message:
C:/Ruby200/lib/ruby/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/lib/sqlite3.rb:in 'require' cannot load such file -- sqlite3/sqlite3_native (LoadError)
this is followed by 16 from messages (I will add them if asked).
My system is Windows XP, Ruby version 2.0.0p195, Rails Version 4.0.0.
I will gladly provide further info upon request.
All the solutions I've found i have tried and it has not worked.
Solutions I've tried:
1) Knapsack solution
2) ruby setup.rb config -- --with-sqlite-include=c:\sqlite-autoconf-3071700
3) ive tried the sqlite-amalgamation download.
4) uninstalling and reinstalling sqlite3, ruby, rails, rubygems, dev tools, etc.
5) running virtual machine with ubuntu 13.04 (rails server command is working as if i said rails new server)
6) and several other command line runs and various downloads.
Its told me many times that its installed sqlite3 version 1.3.7, but I still get the same result.
Please and thank you for your help in advance!!
P.S. Many of the others are based on windows 7 or higher and older versions of ruby and/or rails.
Related
I am having a lot of issues on ruby & gem installation due to which my running projects are stopped working.
Current issues
Can anyone please guide me on "how to completely uninstall ruby + gems + rails out of my Ubuntu 14.04 and then start installing them as fresh".
I am also unable to remove this. Maybe once I completely throughout of my system. It may allow me to fresh install ruby n rails. Looking into this in order to make things work again.
Can anyone help?
If you can see my question up there, I have rbenv, ruby and rails installed and a lot more. I am not able to run it though. And due to which I am thinking of removing it out of my system and install them as fresh. Today, I somehow was able to fix a few issues and created a new rails application and started the server using MySQL. But, its too showing errors on other ruby lib command: rails script/generate model Book Rails is throwing me errors.
/home/<user>/.rvm/gems/ruby-2.5.3/gems/railties-5.2.1/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/<user>/.rvm/gems/ruby-2.5.3/bin in PATH, mode 040777
rails aborted!
Don't know how to build task 'script/generate' (see --tasks)
Can anyone help?
I highly highly recommend not touching the built-in ruby/rails/gems installation.
It's pretty standard these days to use a very lightweight manager, like rbenv which allows you to work with multiple versions of ruby, each with it's own installations of gems. There is also rvm, which is a heavier manager and a bit more invasive.
install the newer versions with rbenv
brew install rbenv
rbenv init
Close your Terminal window and open a new one so your changes take effect.
Verify that rbenv is properly set up using this rbenv-doctor script.
rbenv install.
brew upgrade rbenv ruby-build
and then install rails
ruby on rails setup
for database i preferred sqlite browser
I am trying to create new project using rails but it display error. I am working on mac and its display error.
$rails new EMS
/Users/.rvm/gems/ruby-2.2.0/bin/rails:23:in `load': cannot load such file -- /Users/.rvm/gems/ruby-2.2.0/gems/rails-4.2.0/bin/rails (LoadError)
from /Users/.rvm/gems/ruby-2.2.0/bin/rails:23:in `<main>'
from /Users/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
One day i also faced same issue when i was trying to create new rails application. So followed these below steps and it was soled,
Uninstall the rails
Uninstall the ruby
Again install the latest version of ruby using rvm
than install the rails using command gem install rails
After following these step, now i am able to create new app. May be this also help you to solve this error.
If you are using windows OS as your development environment then please see this link : "certificate verify failed" error when installing Ruby gems on Windows
And I would recommend you to use : http://railsinstaller.org/en
By the way , Brother , Rails would behave perfect with Linux based platform .
And for mac os please take a look at : https://rvm.io/rvm/install
This will help you to have multiple ruby version and to switch between them ... to use full power of ruby and gems.
I've almost pulled out all the remaining hair on my bald head. I've been tinkering with Ruby on Rails on Windows 7 and it works great. I use RailsInstaller 2.2.1 and AptanaStudio3 as my IDE on Windows 7 64bits.
However, going through similar process, I installed these two tools on my 64bit Windows 8 and all hell as been let loose for the past 3 days. RoR projects that run flawlessly on the win 7 do not run on Win 8 with Ruby 1.9.3 p392 and Rails 3.2.13.
Anytime I run launch the server with:
$ rails s
←[31mCould not find rake-10.1.0 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m
And
$ bundle install
gives:
$ bundle install
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundler/v
endor/net/http/persistent/ssl_reuse.rb:29:in initialize': Bad address - connect
(2) (Errno::EFAULT)
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:inopen'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:in block in connect'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:54:intimeou
t'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:99:in timeou
t'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:29:inconnect'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:755:in `do_s
tart'
I've uninstalled and re-installed countless times but no solution. I'm considering installing virtual machine with Win 7 since it works smoothly on Win7. But that means installing another OS.... I'd like to know if others have had success with RoR on Windows 8.
Thanks
I myself tried using RoR on Windows 8 and could not find a solution to the issues I was running into. My suggestion is to keep with Windows 7, wait a little longer until Windows 8's bugs are sorted out.
I'm running rails on Win8 just fine. I checked my rake version, and it is indeed 10.1.0. Try doing gem uninstall rake, and then gem install rake --version 10.1.0. Then try bundler again.
I ran into something similar what I cloned the app I was developing on win8 onto a win 7 machine. The gemfile.lock from win8 was specifying a version of rake that win7 didn't like.
PS: I sympathize with the hair thing. Not much left here either. Hard to "get a grip" some days :-)
Operating System I am using is Mac OSX Mountain Lion.
First I will give some back story on how this cluster F started. I am going through a Ruby on Rails Web development book. I want to use PostgreSQL as my server. Before today I was using sqlite3. I downloaded PostgreSQL 9.1 from there website. I used the DMG installer. Once I was done with the install process it asked me to re-boot because of some sort of memory problem, I did that and it installed without error.
The problem started when I tried to use the "Rails Server" command in the terminal. This is what I got (I tried to strip out the unimportant stuff which would clutter everything up)
/Users/Chris/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/pg-0.12.2/lib/pg.rb:4:in `require': dlopen(/Users/Chris/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/pg-0.12.2/lib/pg_ext.bundle, 9): Library not loaded: /usr/lib/libcrypto.dylib (LoadError)
Referenced from: /usr/lib/libpq.5.dylib
Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libcrypto.0.9.8.dylib provides version 0.9.8 - /Users/Chris/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/pg-0.12.2/lib/pg_ext.bundle
...
from /Users/Chris/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/railties-3.2.8/lib/rails/commands.rb:50:in
I have read through the out put and I have done a lot of Google searching, and what I have found is that it's a problem with which version of libcrypto the server is fetching. Or something about the libssl. I have gone through the solutions on google and nothing seems to be working. Hopefully someone has had the same problem I have, and can help me.
Thanks in advance! -Chris
I really recommend you to use Homebrew to install postrgresql. It helps you to install all proper dependencies for version which correctly works with rails.
$ brew install postgresql
Do not forget to follow after install instructions from homebrew
Are you sure you installed PostgreSQL server/rubygem successfully? From the stack trace I think there's a problem about it.
If your PostgreSQL server/rubygem are working well, then switch another webserver, mongrel/thin are both OK, both have better performance than the default rails server(webrick) and easy to use.
I am new to Ruby/ RoR (like ... today new)
In trying my first real command:
rails g controller welcome index
This error appears:
.../lib/mysql2.rb:9: in 'require': Incorrect MySQL client library
version! This gem was compiled for 5.5.16 but the client library is
5.1.53 (RunTimeError).
Any step by step help on how to fix this would be most appreciated.
Some background:
I did reinstall MySQL between installing RailsInstaller and running this, for other reasons.
Win 7 x64, running 32 bit MySQL
Ruby/Rails installed today from http://railsinstaller.org
Do you have the development version of MySQL installed that has those libraries? And a C compiler installed?
It may be better to use the ruby native gem (if it still exists) for Windows. That's what we used to do in the Rails 2 days.
Sorry I can't be more help.