Unable to run rails generate social_stream:install - ruby-on-rails

It gives me following error. What should I do?
I'm using rails 4.2.5.1
C:/RailsInstaller/Ruby2.1.0/lib/ruby/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 'social_stream'. (Bundler::GemRequireError)
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/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.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from E:/messla/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:141:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:50:in `generate'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

You can try:
first write your Gemfile
gem 'social_stream', :git => 'git://github.com/ging/social_stream.git'
and you can run
bundle update
Or run
rails generate social_stream:install
For explanation look this

Related

Error installing devise gem

I'm trying to use devise gem on a rails app.
That's what I do:
rails new DeviseApp
cd ./DeviseApp
bundle install
Then I go to the gemfile inside the project and put that code:
gem 'devise'
After that, I perform another bundle install
Then I try the following: rails generate devise:install
I obtain the following error:
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'devise'.
Gem Load Error is: undefined method `alias_method_chain' for ActionDispatch::Routing::RouteSet:Class
Did you mean? alias_method
Backtrace for gem load error is:
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/devise-1.5.4/lib/devise/rails/routes.rb:14:in `<class:RouteSet>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/devise-1.5.4/lib/devise/rails/routes.rb:2:in `<module:Routing>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/devise-1.5.4/lib/devise/rails/routes.rb:1:in `<top (required)>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/devise-1.5.4/lib/devise/rails.rb:1:in `<top (required)>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/devise-1.5.4/lib/devise.rb:445:in `<top (required)>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
/Users/lechucico/Documents/rails/DeviseApp/config/application.rb:7:in `<top (required)>'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:82:in `require'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:82:in `preload'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
/Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
/Users/lechucico/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/lechucico/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
-e:1:in `<main>'
Bundler Error Backtrace:
(Bundler::GemRequireError)
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
from /Users/lechucico/Documents/rails/DeviseApp/config/application.rb:7:in `<top (required)>'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:82:in `require'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:82:in `preload'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/lechucico/.rvm/gems/ruby-2.4.0#rails5.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/lechucico/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/lechucico/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
What I can do?
There is a fix for this in the master branch for devise. You can install it directly by having the following lines in your gemfile:
gem 'devise', git: 'https://github.com/plataformatec/devise.git', branch: 'master'
gem 'erubis'
see discussion here

ruby on rails uglifier error on server start up WINDOWS 10

so im new to this and im trying to star my localhost server for rails v5 on win10 i have looked around and cant figer it out
i put this code in`
bundler exec rails server
then i get this
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/uglifier-3.1.13/lib/uglifier.rb:5:in `require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/uglifier-3.1.13/lib/uglifier.rb:5:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
C:/Sites/test_app/config/application.rb:7:in `<top (required)>'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `require'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `block in server'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in `block in require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `each'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.14.6/lib/bundler.rb:107:in `require'
from C:/Sites/test_app/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `require'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `tap'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:85:in `server'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
pls help
You need to install NodeJS, please check out https://nodejs.org/en/download/
But if you want to keep developing with Rails on Windows, you should check the WSL https://msdn.microsoft.com/pt-br/commandline/wsl/install_guide

error while rails s, and i have nodejs

C:/RailsInstaller/Ruby2.1.0/lib/ruby/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 C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/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.11.2/lib/bundler/runtime.rb:72:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from C:/Sites/MyRubyBlog/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Just add bundler gem with the following command.
gem install bundler
Hope,this will help you.

Error installing rails api with postgresql

I am trying to build a skeleton rails-api to use for future use but keep coming across an error. So i am in a folder call Rails_API_Skeleton and i run..
gem install rails-api
Which runs fine.
I then run...
rails-api new Skeleton_App -d postgresql -T
Which also runs without any issues. So i...
cd Skeleton_App/
then run...
bin/rake db:create
And get the following error, which after much googling i cant figure out how to resolve.
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:89:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'rails-api'.
Gem Load Error is: uninitialized constant ActionController::API::RackDelegation
Backtrace for gem load error is:
/Users/username/.rvm/gems/ruby-2.2.2/gems/rails-api-0.4.0/lib/rails-api/action_controller/api.rb:131:in `<class:API>'
/Users/username/.rvm/gems/ruby-2.2.2/gems/rails-api-0.4.0/lib/rails-api/action_controller/api.rb:85:in `<module:ActionController>'
/Users/username/.rvm/gems/ruby-2.2.2/gems/rails-api-0.4.0/lib/rails-api/action_controller/api.rb:5:in `<top (required)>'
/Users/username/.rvm/gems/ruby-2.2.2/gems/rails-api-0.4.0/lib/rails-api.rb:3:in `require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/rails-api-0.4.0/lib/rails-api.rb:3:in `<top (required)>'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/Users/username/Desktop/Apple_tv_movies_and_stuff/skeletons/Rails_API_Skeleton/Skeleton_App/config/application.rb:17:in `<top (required)>'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:82:in `require'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:82:in `preload'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:143:in `serve'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
/Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
/Users/username/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/username/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
-e:1:in `<main>'
Bundler Error Backtrace:
(Bundler::GemRequireError)
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:85:in `block (2 levels) in require'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
from /Users/username/Desktop/Apple_tv_movies_and_stuff/skeletons/Rails_API_Skeleton/Skeleton_App/config/application.rb:17:in `<top (required)>'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:82:in `require'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:82:in `preload'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:143:in `serve'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /Users/username/.rvm/gems/ruby-2.2.2/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/username/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/username/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
Thanks for any help in advance
I suspect something changed with the gem in response to Rails 5.
Maybe its use is deprecated now?
Anyway, the new Rails API way seems to be
http://edgeguides.rubyonrails.org/api_app.html
rails new skeleton_api --api

routing-filter does not work on rails 4

I am trying to convert ?locale=en in routes to /en/ I found routing-filter gem
but if I try to run rails, I get this error:
samir#samir-VirtualBox:~/RubymineProjects/dcaclab$ rails s
/home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require': cannot load such file -- routing_filter/adapters/rails_4 (LoadError)
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing_filter.rb:27:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/routing-filter-0.3.1/lib/routing-filter.rb:1:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
from /home/samir/RubymineProjects/dcaclab/config/application.rb:8:in `<top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `require'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:74:in `block in <top (required)>'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `tap'
from /home/samir/.rvm/gems/ruby-2.1.0#dcaclab/gems/railties-4.0.3/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any idea how to solve this?
The version of the gem you are currently using is probably not compatible with Rails 4. You need to have version 0.4.0.pre, which can be installed through gem install routing-filter --pre or by editing your gemfile. I have found this issue, which relates to your problem: https://github.com/svenfuchs/routing-filter/issues/48

Resources