I am trying to add Tailwind to existing Rails project and I am referring to this documentation: https://tailwindcss.com/docs/guides/ruby-on-rails
However, when I am in step 5 "Run your build process with ./bin/dev.", I am getting following error and I am not sure how to fix it.
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `spawn': Exec format error - bin/rails server -p 3000 (Errno::ENOEXEC)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:54:in `block in run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `chdir'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/process.rb:53:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:367:in `block (2 levels) in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `upto'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:364:in `block in spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:363:in `spawn_processes'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/engine.rb:57:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/cli.rb:42:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
from C:/Ruby31-x64/bin/foreman:32:in `load'
from C:/Ruby31-x64/bin/foreman:32:in `<main>'
It seems like something related to foreman gem. Did anyone encountered similar problem?
Related
I'm new to Jekyll and I'm having a hard time installing the jekyll-polyglot plugin. My latest issues is the following, when trying to run "bundle exec" in the terminal. What is this 'helper x86_64-darwin-19'?
xxxx-xx:sebl xxxxx$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'helper x86_64-darwin-19' in any of the gem sources listed in your Gemfile.
If I run bundle exec jekyll serve, this is what I currently get:
Alessandros-Air:sebl alessandrolodola$ bundle exec jekyll serve
Configuration file: /Users/alessandrolodola/Desktop/SEBL/_config.yml
/Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/lib/jekyll/polyglot/version.rb:3: warning: already initialized constant Jekyll::Polyglot::VERSION
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-polyglot-1.3.3/lib/jekyll/polyglot/version.rb:3: warning: previous definition of VERSION was here
Dependency Error: Yikes! It looks like you don't have /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with `bundle exec`, ensure that you have included the /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- rspec' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
/usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:73:in `rescue in block in require_with_graceful_fail': /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb (Jekyll::Errors::MissingDependencyException)
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:58:in `block in require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:89:in `block in require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:21:in `conscientious_require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in `setup'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in `initialize'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `new'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
/Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb:1:in `require': cannot load such file -- rspec (LoadError)
from /Users/alessandrolodola/Desktop/SEBL/_plugins/polyglot-master/spec/rspec/helper.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:60:in `block in require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/external.rb:57:in `require_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:89:in `block in require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:87:in `require_plugin_files'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:21:in `conscientious_require'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:131:in `setup'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:36:in `initialize'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `new'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:30:in `process'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /usr/local/lib/ruby/gems/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/jekyll:23:in `<top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/alessandrolodola/.local/share/gem/ruby/3.0.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
from /usr/local/opt/ruby/bin/bundle:23:in `load'
from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
```
hi i also got this issue
same as yours
Solution_is_very_simple
bundle
bundle add webrick
jekyll serve --watch --port 3200
Run these commands then your problem will be solved
I'd like to run rails console command but it throw error everytime I run it.
Here is the error I get :
Loading development environment (Rails 5.1.4)
D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `delete': invalid byte sequence in UTF-8 (ArgumentErr
or)
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6090:in `alloc_history_entry'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/rbreadline.rb:6123:in `add_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/site_ruby/2.3.0/readline.rb:368:in `<<'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block (2 levels) in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `each'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:76:in `block in load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `open'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:75:in `load_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:65:in `extended'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `extend'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:21:in `init_save_history'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/ext/save-history.rb:45:in `save_history='
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb/context.rb:91:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:426:in `initialize'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `new'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/irb.rb:383:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:6
2:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:1
7:in `start'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/commands/console/console_command.rb:9
7:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform'
from D:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke'
from D:/RailsInstaller/Ruby2.3.3/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've tried to reinstall/reinstall and clean every version of ruby with no success. I use Ruby 2.3.3 and rails 5.1.4.
Thanks
Since you are on Windows(I'm assuming since you have D:/):
Try installing rb-readline gem in your development group. That's the easiest way for solving readline issues.
There are other solutions as well if that doesn't work.
After Cloning the ShopSpree Sales I followed the installation instructions and almost worked fine except bundle exec rake spree_sample:load. It gives me the following error :
asdf08:~/workspace (master) $ bundle exec rake spree_sample:load
Loaded Payment Methods samples
Loaded Shipping Categories samples
Loaded Shipping Methods samples
Loaded Tax Categories samples
Loaded Tax Rates samples
rake aborted!
Chewy::UndefinedUpdateStrategy: Index update strategy is undefined in current context.
Please wrap your code with `Chewy.strategy(:strategy_name) block.`
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/strategy/base.rb:17:in `update'
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/type/observe.rb:70:in `update_index'
/usr/local/rvm/gems/ruby-2.3.0/gems/chewy-0.8.3/lib/chewy/type/observe.rb:28:in `block in update_proc'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:446:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:446:in `block in make_lambda'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:263:in `block in simple'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `block in call'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `each'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:506:in `call'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/callbacks.rb:778:in `_run_commit_callbacks'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:314:in `committed!'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:89:in `commit_records'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:153:in `commit'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:175:in `commit_transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `within_new_transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:220:in `transaction'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/transactions.rb:291:in `save!'
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.4/lib/active_record/persistence.rb:51:in `create!'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:129:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:124:in `each'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/db/samples/products.rb:124:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/spree/sample.rb:13:in `load_sample'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/spree_sample.rb:16:in `load_samples'
/usr/local/rvm/gems/ruby-2.3.0/bundler/gems/spree-a275c9db4f0c/sample/lib/tasks/sample.rake:20:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli/exec.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:332:in `exec'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:20:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/cli.rb:11:in `start'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/exe/bundle:34:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.0/gems/bundler-1.13.6/exe/bundle:26:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/usr/local/rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => spree_sample:load
(See full trace by running task with --trace)
However I tried starting rail server and It gives me something like below without any styles.I think the page is not completely loaded.
And when I try to login with given credentials in creating admin user db:seed
It keep on displaying You have to confirm your account before continuing.
Giving invalid credentials shows me Invalid email or password. So that means nothing wrong with my credentials here.
I know this app is back-end api for Spree Android App.
Any help would be appreciable in this matter. Thank you.
looks like you have some configs to attend to in chewy. Look here: https://github.com/toptal/chewy
I'm trying to debug my rails application with the derailed_benchmarks gem. I am following the instructions on their Github. I can run my server locally in production, but when I try to execute the command derailed exec perf:mem_over_time I get the following error:
/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:92:in `call_app': Bad request: <html><body>You are being redirected.</body></html> (RuntimeError)
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/lib/derailed_benchmarks/tasks.rb:145:in `block (2 levels) in <top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `call'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `each'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
from /Users/cowan/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:41:in `exec'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/cowan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.1.3/bin/derailed:85:in `<top (required)>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `load'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/derailed:23:in `<main>'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
from /Users/cowan/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Any help is greatly appreciated.
My application uses puma, so I had to specify that when I ran the command.
$ USE_SERVER=puma derailed exec perf:mem_over_time
I'm using ActiveAdmin framework, I followed the ActiveAdmin's getting started and in the last step rails generate active_admin:resource [MyModelName] I write this: rails generate active_admin:resource User then I tried to see the results in the browser so I run the server rails s and then I get this problem:
edu#edu-ThinkPad-Edge:~/Desktop/rails_proyects/fulbo$ rails server
=> 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 /home/edu/Desktop/rails_proyects/fulbo/app/admin/users.rb:1:in `<top
(required)>': uninitialized constant User (NameError) from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/application.rb:179:in
`block in load!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/application.rb:179:in
`each' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/application.rb:179:in
`load!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/application.rb:197:in
`routes' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin.rb:83:in
`routes' from
/home/edu/Desktop/rails_proyects/fulbo/config/routes.rb:3:in `block in
<top (required)>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in
`instance_exec' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in
`eval_block' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:267:in
`draw' from
/home/edu/Desktop/rails_proyects/fulbo/config/routes.rb:1:in `<top
(required)>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in
`block in load_paths' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in
`each' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in
`load_paths' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:16:in
`reload!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application.rb:108:in `reload_routes!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/reloader.rb:34:in
`reload!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activeadmin-0.6.0/lib/active_admin/reloader.rb:61:in
`block in attach!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:429:in
`_run__246534365__prepare__874865436__callbacks' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
`__run_callback' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in
`_run_prepare_callbacks' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in
`run_callbacks' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/actionpack-3.2.13/lib/action_dispatch/middleware/reloader.rb:74:in
`prepare!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/actionpack-3.2.13/lib/action_dispatch/middleware/reloader.rb:48:in
`prepare!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application/finisher.rb:47:in
`block in <module:Finisher>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in
`method_missing' from
/home/edu/Desktop/rails_proyects/fulbo/config/environment.rb:5:in
`<top (required)>' from
/home/edu/Desktop/rails_proyects/fulbo/config.ru:3:in `block in
<main>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/builder.rb:51:in
`instance_eval' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/builder.rb:51:in
`initialize' from /home/edu/Desktop/rails_proyects/fulbo/config.ru:in
`new' from /home/edu/Desktop/rails_proyects/fulbo/config.ru:in
`<main>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/builder.rb:40:in
`eval' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/builder.rb:40:in
`parse_file' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/server.rb:200:in
`app' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/server.rb:304:in
`wrapped_app' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/rack-1.4.5/lib/rack/server.rb:254:in
`start' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/commands.rb:55:in
`block in <top (required)>' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/gems/railties-3.2.13/lib/rails/commands.rb:50:in
`tap' from
/home/edu/.rvm/gems/ruby-1.9.3-p392#fulbo/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>'
someone knows how to fix it or what's wrong.
The problem you are encountering is - ActiveAdmin is trying to generate resource on users, but model for users doesn't exist. Therefore, you will have to create a model User before you generate active_admin resource on User.
Do it as follows:
rm app/admin/users.rb
rails generate model User username: string email: string
bundle exec rake db:migrate
#this should be successful
rails generate active_admin:resource User
rails server
Let me know, if it helps you out. Comment with the errors you encounter.
Good luck