This error comes every time I type rails generate :
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.2/lib/mysql2.rb:31:in
`require':
dlopen(/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle,
9): Library not loaded: libmysqlclient.18.dylib Referenced from:
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
Reason: image not found -
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
(LoadError) from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/mysql2-0.4.2/lib/mysql2.rb:31:in
`<top (required)>' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in
`require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in
`block (2 levels) in require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in
`each' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in
`block in require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in
`each' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in
`require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/lib/bundler.rb:99:in
`require' from
/Users/hadifarhat/simple_cms/config/application.rb:7:in `<top
(required)>' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:82:in
`require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:82:in
`preload' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:143:in
`serve' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:131:in
`block in run' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:125:in
`loop' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application.rb:125:in
`run' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/spring-1.6.1/lib/spring/application/boot.rb:18:in
`<top (required)>' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from
/Users/hadifarhat/.rbenv/versions/2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require' from -e:1:in `<main>'
insert into your GemFile
gem 'mysql2', '~> 0.3.18'
install some mysql2 dependency
sudo apt-get install libmysql-ruby libmysqlclient-dev
then bundle install
bundle install
Add into your GemFile
gem 'mysql2' #For latest version
Then update your bundle
bundle install
Then generate rails into ruby folder
gem install rails
Finally create project
rails new project #Project your project name
Hope will help you
Related
I have this versions, and I cannot change the ruby and rail versions
ruby version - 1.9.2-p290
rail version - 3.0.9
mysql2 version - 0.2.9
when I try to run rails server command on Ubuntu, I am getting this error
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'.
Gem Load Error is: uninitialized constant Mysql2::Client::SECURE_CONNECTION
Backtrace for gem load error is:
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.9/lib/mysql2/client.rb:12:in `<class:Client>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.9/lib/mysql2/client.rb:2:in `<module:Mysql2>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.9/lib/mysql2/client.rb:1:in `<top (required)>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/mysql2-0.2.9/lib/mysql2.rb:9:in `<top (required)>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:82:in `require'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in `each'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:77:in `block in require'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in `each'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler/runtime.rb:66:in `require'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/bundler-1.15.4/lib/bundler.rb:108:in `require'
/home/xyz/Documents/trailtap-api/config/application.rb:9:in `<top (required)>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/xyz/Documents/trailtap-api/Rakefile:4:in `<top (required)>'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:94:in `block in load_rakefile'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:93:in `load_rakefile'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:77:in `block in run'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/home/xyz/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/home/xyz/.rbenv/versions/1.9.2-p290/bin/rake:23:in `load'
/home/xyz/.rbenv/versions/1.9.2-p290/bin/rake:23:in `<main>'
Bundler Error Backtrace:
/home/xyz/Documents/trailtap-api/config/application.rb:9:in `<top (required)>'
/home/xyz/Documents/trailtap-api/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
I thought gem file needed to be update so I updated it but then mysql2 doesnot support rail version and doesnot ship active record adapter, even after installing adapter gem it fails.
Thanks in advance.
Check this article: uninitialized constant Mysql2::Client::SECURE_CONNECTION
Solution was to upgrade mysql2. In your case, might be worth trying downgrading the that version and see if it fixes your issue.
Also, make sure that libmysqlclient-dev and ruby-mysql are installed and up-to-date
Try
gem 'rails', '3.0.9'
gem 'mysql2', "0.2.24"
I have ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32] and rails 5.1.4. I am getting following error when i run rails s command.
rails s
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- bcrypt_ext (LoadError)
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:12:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:83:in `block (2 levels) in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:78:in `block in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `each'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler/runtime.rb:67:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0.pre.2/lib/bundler.rb:114:in `require'
from E:/Rauf Personal Data/work/rails/shine/config/application.rb:7:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:133:in `block in perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `tap'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/server/server_command.rb:130:in `perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have almost tried every solution but i am unable to resolve this issue. Can any body please help me to sort out this issue. I already tried following:
Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:
gem uninstall bcrypt and gem uninstall bcrypt-ruby
Install it again with gem install bcrypt --platform=ruby
In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
Run bundle install
I have managed to solve this issue by adding following line in the Gemfile....
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
After trying several methods, the above worked for me:
1) Stop all rails servers.
2) Add : gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt' to the gemfile.
3) bundle install.
I am following ruby on rails getting started guide ( http://guides.rubyonrails.org/getting_started.html )
I installed ruby and rails as it is suggested in the guide but when I try to execute:
bin/rails server
I see the following error in the terminal:
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
/var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/soroosh/rails/blog/config/application.rb:7:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/lib/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from /home/soroosh/rails/blog/bin/rails:9:in `require'
from /home/soroosh/rails/blog/bin/rails:9:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/client/rails.rb:28:in `load'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/client/rails.rb:28:in `call'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/client/command.rb:7:in `call'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/client.rb:28:in `run'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/bin/spring:49:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/binstub.rb:11:in `load'
from /var/lib/gems/2.1.0/gems/spring-1.6.3/lib/spring/binstub.rb:11:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/soroosh/rails/blog/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I am using ubuntu 15.10 , ruby 2.1 and rails4.2.5.1
If you look closely at the error message, this is the important line:
There was an error while trying to load the gem 'uglifier'.
Uglifier is a Javascript wrapper, so it will need a Javascript interpreter. I recommend installing NodeJS:
sudo apt-get install nodejs
read more about uglifier: https://github.com/lautis/uglifier
I get this error when ever I run this command rails g mongoid:config. Does anybody have any idea
/home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/history.rb:1:in `require': cannot load such file -- readline (LoadError)
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/history.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/interface.rb:1:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/interface.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/core.rb:5:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug/core.rb:5:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug.rb:1:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/byebug-3.5.1/lib/byebug.rb:1:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:76:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:72:in `each'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:61:in `each'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler/runtime.rb:61:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib/bundler.rb:134:in `require'
from /home/gardezi/blog/config/application.rb:7:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:82:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:82:in `preload'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:143:in `serve'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:131:in `block in run'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:125:in `loop'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application.rb:125:in `run'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/gardezi/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
The commands that I ran are as followed below:
gem install mongoid
rails new blog
gedit /blog/Gemfile
in which I wrote
gem 'mongoid', '4.0.2'
gem 'bson_ext'
and then I ran bundle
and then rails g mongoid:config
Thanks to Shweta the rails g command is not giving an error now but now I am encountering another problem and that is when ever I run this command it's running in infinite loop. It's been seven hours and still running so please tell me what should I do.
THANKS IN ADVANCE
I solved the problem. I just needed to stop the spring.
Follow following steps:
1] Skip active-record while creating new project
rails new blog -O
2] open Gemfile add gem 'mongoid'. No need to add gem 'bson_ext'
gem 'mongoid'
3] Install bundle
bundle install
4] Generate mongoid config file
rails g mongoid:config
Hope this helps.
I'm using Ruby 2.1.5, Rails 4.1.6 and PostgreSQL 9.3.5 on a Windows machine.
When I try to bundle exec rails server, I end up with the following error:
DL is deprecated, please use Fiddle
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- 2.1/pg_ext (LoadError)
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in re...re'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependancy'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:10:in `rescue in <top (required)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/pg-0.17.1-x86-mingw32/lib/pg.rb:3:in `<top (required)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `each'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:72:in `block in require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `each'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:61:in `require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.7.7/lib/bundler.rb:133:in `require'
from C:/....../config/application.rb:5:in `<top (required)>'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:8:in `require'
from bin/rails:8:in `<main>'
I needed to use a newer version of pg gem:
gem 'pg', '~> 0.18.0.pre20141117110243'
After updating, sometimes happens.
Try remove all gems and install all again. like
rm -rf ./vendor/bundle
bundle install