I am learning Ruby on Rails and still unfamilar with some of parts of the language.
I am trying to get a rails project to display on Firefox however as soon as I enter the command "rails s" I am presented with the following error:
Rails S Error
The source code is :
C:\Sites\weeks_1_-_15\week_1\bookshop1a>rails s
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/act
ive_support/values/time_zone.rb:282: warning: circular argument reference - now
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/
lib/sqlite3.rb:6:in require': cannot load such file -- sqlite3/sqlite3_native (
LoadError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10
-x86-mingw32/lib/sqlite3.rb:6:inrescue in '
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10
-x86-mingw32/lib/sqlite3.rb:2:in <top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:91:inrequire'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:91:in block (2 levels) in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:86:ineach'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:86:in block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:75:ineach'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler/runtime.rb:75:in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6
/lib/bundler.rb:106:inrequire'
from C:/Sites/weeks_1_-_15/week_1/bookshop1a/config/application.rb:7:in
<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.0.2
/lib/rails/commands.rb:74:inrequire'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.0.2
/lib/rails/commands.rb:74:in block in <top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.0.2
/lib/rails/commands.rb:71:intap'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.0.2
/lib/rails/commands.rb:71:in <top (required)>'
from script/rails:6:inrequire'
from script/rails:6:in `'
Any help would be much appreciated!
Thank you!
The error message indicates that SQLite is not installed or properly configured.
Try starting rails server after installing SQLite first.
Maybe this tutorial is helpful to get SQLite up and running:
http://www.sqlitetutorial.net/download-install-sqlite/
Related
How can I solve this problem? please, help.
I am using windows 10 and I am trying to run this already existing RoR project.I am very newbie to these projects. Here an error with stack:
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-3.2.6/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.rb:17:in require': cannot load such file -- 2.2/http11 (LoadError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.rb:17:inrescue in '
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/mongrel-1.2.0.pre2-x86-mingw32/lib/mongrel.rb:13:in <top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:inrequire'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in block (2 levels) in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:ineach'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:ineach'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.13.6/lib/bundler.rb:106:inrequire'
from C:/bottomup_source/bottomup_source/config/application.rb:7:in <top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-3.2.6/lib/rails/commands.rb:53:inrequire'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-3.2.6/lib/rails/commands.rb:53:in block in <top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-3.2.6/lib/rails/commands.rb:50:intap'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/railties-3.2.6/lib/rails/commands.rb:50:in <top (required)>'
from script/rails:6:inrequire'
from script/rails:6:in `'
i m using ruby on rails from last one year , i would recommend you to use linux or ubuntu for ruby on rails as most of the tools are not compatible with windows for development, but still if you want to use on windows os the follow this ruby on rails on window hopefully this will help you.
Currently using rails 4.2.0 & ruby 2.2.0p0
re-bundled to pick up some gem updates
RAILS_ENV=production rails c fails with the following stack trace
/home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:in require': File is already defined (NameError)
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:inblock (2 levels) in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:in each'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:inblock in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in each'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:inrequire'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler.rb:134:in require'
from /home/linkee/linker/config/application.rb:14:in'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:141:in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:141:inrequire_application_and_environment!'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:67:in console'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in <top (required)>'
from /home/linkee/linker/bin/rails:4:inrequire'
from /home/linkee/linker/bin/rails:4:in `'
I note that the runtime.rb fails when trying to require 'zipruby' so I excluded that gem from being required by changing line 76 in require.rb to
pp required_file = file
Kernel.require(file) unless file == 'zipruby'
and that at least bypassed whatever the problem was.
Please let me know if you require further information to help in sorting out this problem.
I've installed the ruby-audio-1.6.1 gem and I've added it to my Gemfile for my rails project however when trying to start up the server I'm getting:
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in
require': 126: The specified module could not be found.
- C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/ruby-audio-1.6.1/rubyaudio_ext.so
(LoadError)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in
rescue in '
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:1:in
<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:76:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:76:in
block (2 levels) in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:72:in
each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:72:in
block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:61:in
each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler/runtime.rb:61:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.8/lib/bundler.rb:134:in
require'
from E:/Development/mixer/config/application.rb:7:in <top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:79:in
block inserver'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in
tap'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:76:in
server'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands/commands_tasks.rb:40:in
run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.8/lib/rails/commands.rb:17:in
<top (required)>'
from bin/rails:4:inrequire'
from bin/rails:4:in `'
I've been digging around and can't find much, I've ensured that libsndfile is installed correctly so the initial gem install went just fine, it's now just erroring out at this point. I've checked the file actually exists in that location and it does some I'm a bit stumped as to what could be going wrong.
In your Gemfile, try marking it as require false:
gem 'ruby-audio', require: false
Try starting the server, and post the results in your question.
You may also want to try a newer gem because the ruby-audio gem is quite old.
The sndfile gem is similar and newer: https://github.com/ronen/sndfile
Hi I am having a problem using devise with the ruby on rails server. My server was running fine until I ran a rake routes and realized the server is missing some devise files. Currently the ruby on rails server wont even start. I do remember moving my devise folder but cant remember where it should be for the server to come back online.
This is the error message I get in the console. Can someone please help? Thanks.
C:\Users\rich\treebook>rails server
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/devise-3.2.1/lib/devise.rb:266:in `<m
odule:Devise>': cannot load such file -- devise/controllers/helpers (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/devise-3.2.1/lib/devise.
rb:8:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:72:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:72:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:70:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:70:in `block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:59:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r/runtime.rb:59:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4/lib/bundle
r.rb:132:in `require'
from C:/Users/Sam/treebook/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rail
s/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rail
s/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rail
s/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rail
s/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Have you done
rails generate devise:install?
Also I agree with Zippie that uninstalling and reinstalling may be the way to go.
in my application, in the last few days, i'm unable to run the rails server/rails s or even bundle exec rails server command any more.
it was running like a charm before.
i tried to revert the changes using git, but no luck, i tried all the possible proprieties i could think of.
i use rubymine, but same problem when using the Terminal .
when i run:
ma#SL510:~/ts$ rails server
i get the following error stack trace :
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn/http_request.rb:4:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392#global/gems/unicorn-4.6.2/lib/unicorn.rb:103:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /home/ma/ts/config/application.rb:16:in `<top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
i don't know how could i fix this, to get the rails server command to run again !
any help would be appreciate it !
ps: please tell me if i need to provide more info. Thanks.
Thanks to Jef
creating a new gemset and using it
and after this:
gem install unicorn
fixed the problem with that command :)
You may try to create a brand new gemset (and use it), then bundle install so that Bundler install gems listed in your Gemfile. The stacktrace seems to indicate you're using the global gemset, which is a really bad idea.