I am getting the following error while giving the "rails s" command in my cmd. the error is given in the link.
i am using mongodb as my database and not mysql.'pls suggest what to do
http://paste.kde.org/742976
-- Relevant Clip ---
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (cannot load such file --sqlite3/sqlite3_native) (LoadError)
Assuming you are using a ODM like Mongoid you will need to get rid of ActiveRecord in order to use MongoDB properly.
Instructions here should be helpful: http://mongoid.org/en/mongoid/docs/installation.html
Open myapp/config/application.rb and near the top, remove the line require "rails/all"
Related
I'm trying to start rails server (puma) using command rails s
I get this error:
rails s I, [2017-11-16T10:47:05.872867 #16905] INFO -- sentry: **
[Raven] Raven 2.5.1 configured not to capture errors: Not configured
to send/capture in environment 'development'
=> Booting Puma
=> Rails 5.1.3 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options Exiting /home/mariusz/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in require': libssl.so.1.0.2: cannot open shared object file: No such
file or directory -
/home/mariusz/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/puma-3.10.0/lib/puma/puma_http11.so
(LoadError) from
/home/mariusz/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:inblock in require'
My project info:
puma (3.10.0), rails (5.1.3), ruby 2.4.0
The problem was with invalid environment. I needed to restore all my gems to pristine state. Running gem pristine --all helped. (it takes about 10 min to finish it)
I solved the problem this way.
Go to the tmp/pids folder then in the server.pids file erases the content of this file. The content is the pid of the server rails execution process.
I am newbie in ruby on rails. I'm currently installing Ruby on Rails.
I've done all the steps until : bundle install.
Then i type rails server to start the rails server. From what I read in http://guides.rubyonrails.org/command_line.html, after i type rails server, it's supposed to show:
$ cd commandsapp
$ bin/rails server
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-08-07 02:00:01] INFO WEBrick 1.3.1
[2013-08-07 02:00:01] INFO ruby 2.0.0 (2013-06-27) [x86_64-darwin11.2.0]
[2013-08-07 02:00:01] INFO WEBrick::HTTPServer#start: pid=69680 port=3000
but in my Command Line it show this, instead:
So the rails server is not running and when i type localhost:3000 or localhost:8000 in the browser, it says unable to connect(probably because the server isn't running).
Sorry my bad language.
You need to create a rails app and change into that directory before you can run the server. Try this:
rails new commandsapp # the name can be anything you want
cd commandsapp
rails server
"rails new " creates a new folder with the default rails layout (app, db, log etc).
The Error: 'require' : cannot load such file -- sqlite3/sqlite3_native (LoadError)
==> You must insert gem sqlite3/sqlite3_native into gemfile, then bundle install again. Try with rails server.
It is very strange. I even tried a brand new project:
rails new abc
cd abc
rails s
The output is:
=> Booting WEBrick
=> Rails 4.1.1 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
active_support/descendants_tracker
active_support/core_ext/module/delegation
active_support/core_ext/object/to_param
active_support/core_ext/regexp
... lots more here
active_support/core_ext/array/extract_options
rack/utils
action_controller/metal/exceptions
[2015-04-23 19:35:42] INFO WEBrick 1.3.1
[2015-04-23 19:35:42] INFO ruby 2.1.2 (2014-05-08) [x86_64-darwin13.0]
[2015-04-23 19:35:42] INFO WEBrick::HTTPServer#start: pid=12738 port=3000
It doesn't break anything, but it makes reading output to debug very difficult.
It happens for all usage of rails and rake, in or out of bundle exec, but not bundle commands like bundle list or bundle install
Strangest thing... but it went away when I updated from rails 4.1.1 to rails 4.2.1
I did:
gem install ruby-debug
Then it installs...
I launched using:
rails server -u -p 3002
(I also tried with -d)
I get this:
=> Booting WEBrick
=> Rails 3.0.1 application starting in development on http://0.0.0.0:3002
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
You need add ruby-debug in your Gemfile
gem 'ruby-debug'
I am unable to run ruby on rails application. I setup the database and loaded database schema. When I run:
ruby script/server -e production
It says:
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Crtl-C to shutdown server
and it just stays there. If I go to the directory where the app is installed, it just lists the directory of files and doesn't run the app. Any suggestions?
Thanks
Have you opened http://localhost:3000/ in a browser?
The '=> Booting Mongrel ...' stuff means the server is running, you just need to navigate a browser to it.
You are starting your server in production mode.
Use the development mode fpr debugging, it will give you a better log output.
Run ruby script/server -e development