I'm using rails 4.2.0
I'm using ruby : ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
and rbenv : rbenv 0.4.0-129-g7e0e85b
when I'm trying to open rails c in console in production, I have the following error :
~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `initialize': Permission denied # rb_sysopen - /tmp/spring/71079e88c49df6873d86594ca3ada123.pid (Errno::EACCES)
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `open'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `open'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `server_running?'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/run.rb:25:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/rails.rb:23:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client.rb:26:in `run'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/bin/spring:48:in `<top (required)>'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `<top (required)>'
from ~/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from ~/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/www/site/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I have update bundle, but nothing change. What's wrong?
Do you have the spring gem inside your production group?
Spring should be inside test and dev only. eg.
group :development, :test do
gem 'spring'
end
fix by :
sudo chmod -R 1777 /tmp
and reboot spring.
Related
My issue is very similar to that described in issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline
However, setting HOME and/or HOMEPATH via the AWS console has not helped. I get the same error, every time. Here is the relevant logfile:
/var/log/eb-activity.log
++ export PATH=/opt/rubies/ruby-2.3.4/bin:/opt/elasticbeanstalk/lib/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
++ PATH=/opt/rubies/ruby-2.3.4/bin:/opt/elasticbeanstalk/lib/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
+++ /opt/rubies/ruby-2.3.4/bin/ruby -
++ eval 'export RUBY_ENGINE=ruby;
export RUBY_VERSION=2.3.4;
export GEM_ROOT="/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0";'
+++ export RUBY_ENGINE=ruby
+++ RUBY_ENGINE=ruby
+++ export RUBY_VERSION=2.3.4
+++ RUBY_VERSION=2.3.4
+++ export GEM_ROOT=/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0
+++ GEM_ROOT=/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0
++ (( 0 != 0 ))
+ cd /var/app/ondeck
+ su -s /bin/bash -c 'bundle exec /opt/elasticbeanstalk/support/scripts/check-for-rake-task.rb assets:precompile' webapp
`/home/webapp` is not a directory.
Bundler will use `/tmp/bundler/home/webapp' as your home directory temporarily.
+ '[' false == true ']'
+ su -s /bin/bash -c 'bundle exec rake assets:precompile' webapp
`/home/webapp` is not a directory.
Bundler will use `/tmp/bundler/home/webapp' as your home directory temporarily.
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'rb-readline'.
Gem Load Error is: HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory
Backtrace for gem load error is:
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1097:in `<module:RbReadline>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:17:in `<top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:10:in `<module:Readline>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:8:in `<top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.5/lib/rb-readline.rb:16:in `<top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `each'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `block in require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `each'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `require'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler.rb:108:in `require'
/var/app/ondeck/config/application.rb:7:in `<top (required)>'
/var/app/ondeck/Rakefile:5:in `require'
/var/app/ondeck/Rakefile:5:in `<top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:94:in `block in load_rakefile'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:93:in `load_rakefile'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:77:in `block in run'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/lib/rake/application.rb:75:in `run'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/rake-11.1.2/bin/rake:33:in `<top (required)>'
/opt/rubies/ruby-2.3.4/bin/rake:22:in `load'
/opt/rubies/ruby-2.3.4/bin/rake:22:in `<top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/rubies/ruby-2.3.4/lib/ruby/gems/2.3.0/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `load'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `<main>'
Bundler Error Backtrace:
/var/app/ondeck/config/application.rb:7:in `<top (required)>'
/var/app/ondeck/Rakefile:5:in `require'
/var/app/ondeck/Rakefile:5:in `<top (required)>'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `load'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `<main>'
HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory
/var/app/ondeck/config/application.rb:7:in `<top (required)>'
/var/app/ondeck/Rakefile:5:in `require'
/var/app/ondeck/Rakefile:5:in `<top (required)>'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `load'
/opt/rubies/ruby-2.3.4/bin/bundle:22:in `<main>'
(See full trace by running task with --trace) (Executor::NonZeroExitStatus)
[2018-03-08T21:21:50.587Z] INFO [2045] - [Application update 2018-03-02-1047-retry-0307#28/AppDeployStage0/AppDeployPreHook/11_asset_compilation.sh] : Activity failed.
[2018-03-08T21:21:50.587Z] INFO [2045] - [Application update 2018-03-02-1047-retry-0307#28/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2018-03-08T21:21:50.587Z] INFO [2045] - [Application update 2018-03-02-1047-retry-0307#28/AppDeployStage0] : Activity failed.
[2018-03-08T21:21:50.587Z] INFO [2045] - [Application update 2018-03-02-1047-retry-0307#28] : Completed activity. Result:
Application update - Command CMD-AppDeploy failed
[2018-03-08T21:30:11.781Z] INFO [2654] - [CMD-TailLogs] : Starting activity...
[2018-03-08T21:30:11.781Z] INFO [2654] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2018-03-08T21:30:11.781Z] INFO [2654] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2018-03-08T21:30:11.781Z] INFO [2654] - [CMD-TailLogs/TailLogs] : Starting activity...
[2018-03-08T21:30:11.781Z] INFO [2654] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
When I log on to the EC2 instance, I can verify that $HOME is set as expected, but I still get the above result. I hypothesize that maybe the problem I'm having is that the app is started in some chrooted configuration and the directories I'm choosing don't exist? Or maybe I need to use "path syntax" with ":" characters?
But trial-and-error is going to take a long, long time here, I'm redownloading via dashboard with every try. So if someone has something more definitive, I'd really appreciate it.
Well, I have solved this. I eliminated the rbreadline gem from my build. This was causing the problem. I had to solve another problem to do this, first I looked at rails console doesn't load due to libreadline
However the solution given,
ln -s /usr/local/opt/readline/lib/libreadline.dylib \
/usr/local/opt/readline/lib/libreadline.6.dylib
did not work. What worked for me was
ln -s /usr/local/opt/readline/lib/libreadline.dylib \
/usr/local/opt/readline/lib/libreadline.6.2.dylib
I'm newbie to Ruby on Rails. I complete installation with little to no stress, but while create a new app using command 'rails new ' I'm getting error and /bin is not getting generated. Error log below. I've spent whole night trying to understand the cause but alas with no success. Any help will be appreciated.
Few details of my machine :
I'm using OS X El cap v 10.11.5
Rails on 4.2.6
Ruby on 2.3.1
database is Mongodb enterprise 3.2.7
error details
localhost:versions kiranchakravarthy$ rails --version
Rails 4.2.6
localhost:versions kiranchakravarthy$ rails _4.2.6_ new hello_world
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
/Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/2.3.0/erb.rb:864:in `eval': (erb):4: syntax error, unexpected '=' (SyntaxError)
= gem.comment
^
(erb):6: syntax error, unexpected '=', expecting keyword_end
= gem.commented_out ? '# ' : '...
^
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/2.3.0/erb.rb:864:in `result'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:17:in `template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:45:in `gemfile'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/app_base.rb:132:in `build'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:186:in `create_root_files'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/application.rb:17:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/cli.rb:14:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/bin/rails:9:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/bin/rails:22:in `load'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/bin/rails:22:in `<main>'
Try reinstalling Ruby 2.3.1 via your rbenv
I am running the rspec spec/ command from the third chapter. Created the sample_app using command
rails new sample_app -T -database=postgresql
and when running the command rspec spec/ getting the below error.
C:\Users\ASUS PC\rails_projects\Sample_App>rspec spec
You must 'gem install win32console' to use colour on Windows
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- test/unit/assertions (LoadError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-2.0.1/lib/rspec/rails/adapters.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-2.0.1/lib/rspec/rails.rb:20:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/Users/ASUS PC/rails_projects/Sample_App/spec/spec_helper.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Users/ASUS PC/rails_projects/Sample_App/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `load'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `block in load_spec_files'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `map'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `load_spec_files'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:55:in `run_in_process'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:46:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:10:in `block in autorun'
Looks like rails is looking for test directory which was not created.
Rspec Gem list:
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
rspec-rails (2.0.1)
rspec-support (3.4.1)
Gemfile Development and Test
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'webrat', '0.7.3'
gem 'rspec-rails', '~> 2.0.0'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
Did you actually try to install the gem mentionned in the error ?
gem install win32console
Also it seems you still have some dependencies to the classical test framework. Did you check application.rb for any call to the test railties that would not be commented out ?
# require "rails/test_unit/railtie"
Shoud be commented
So I have ruby 2.2.0 installed on a VPS and I'm trying to install rails. The only problem is, when I do a gem install rails it fails. I tried it with the backtrace and the following is what I get:
usera#node3:~$ gem install --backtrace rails
ERROR: While executing gem ... (SocketError)
getaddrinfo: Name or service not known
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:791:in `send'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:791:in `send'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:672:in `request'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:528:in `block in fetch_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1096:in `block (3 levels) in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1094:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1094:in `block (2 levels) in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1093:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1093:in `block in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1091:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1091:in `resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:519:in `fetch_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:509:in `each_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:490:in `getresource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:92:in `api_endpoint'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source.rb:46:in `api_uri'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source.rb:85:in `dependency_resolver_set'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:23:in `block in pick_sets'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each_source'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:22:in `pick_sets'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:28:in `find_all'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb:151:in `find_all'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb:54:in `add_always_install'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/dependency_installer.rb:463:in `resolve_dependencies'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:238:in `install_gem'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:299:in `block in install_gems'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:295:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:295:in `install_gems'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:202:in `execute'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:307:in `invoke_with_build_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:168:in `process_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:138:in `run'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/gem_runner.rb:54:in `run'
/home/usera/.rbenv/versions/2.2.0/bin/gem:21:in `<main>'
I also ran gem install --backtrace -p rails and got the following
usera#node3:~$ gem install --backtrace -p rails
ERROR: While executing gem ... (OptionParser::InvalidArgument)
invalid argument: -p rails
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/local_remote_options.rb:27:in `block in accept_uri_http'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:377:in `handle_options'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:298:in `invoke_with_build_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:168:in `process_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:138:in `run'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/gem_runner.rb:54:in `run'
/home/usera/.rbenv/versions/2.2.0/bin/gem:21:in `<main>'
It seems to work fine on my other VPS so I'm a bit confused.
Thanks in advance!
So I finally figured out what was going on. It turns out that the configuration file for the DNS servers had an extra comma after the IP addresses which caused it to not resolve properly. I'm on ubuntu 14.04 and the file was in /etc/resolve.conf.
When I try to db:migrate my app, I Get this error:
rake aborted!
undefined method `less' for #<Rails::Application::Configuration:0x007fdca55c75e0>
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/railtie/configuration.rb:95:in `method_missing'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/twitter-bootstrap-rails-965ebd304f74/lib/twitter/bootstrap/rails/engine.rb:17:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:215:in `initialize!'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:6:in `<top (required)>'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:189:in `require_environment!'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:250:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
What could be wrong? I already have gem 'less', '2.4.0' in Gemfile
Add therubyracer gem and less-rails gem
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"
Please check the link for issue at the gem: https://github.com/seyhunak/twitter-bootstrap-rails/issues/437