I am fairly new to Ruby. I am have a problem getting my console to start a second time. I created my app (JacksApp) and created a model for it. I then shut down the app tried to restart the console a second time. When I type "rails c" I get this:
Running via Spring preloader in process 81129 Loading development environment (Rails 5.0.0.1) No entry for terminal type "1.0.0/libexec:/Users/johnseabolt/.rbenv/shims:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"; using dumb terminal settings. irb(main):001:0>
I don't understand what's going on. Can someone help? I am in the directory for the app. I'm confused.
to fix this, you need to stop all rails processes and stop spring (bin/spring stop) and then make sure that you start up spring with an attached terminal.
There are basically three ways where spring would get started: bundle exec rails server, bundle exec rails console, or something like bundle exec guard or some other testing thing. If you start up rails through foreman, then it will run one of these commands, basically.
Starting the console will attach a input to the process, and this is where it will figure out the "terminal" type. Do that first, before everything thing else. Once that's loaded in memory, then its configured correctly, and starting up server or whatever will work find.
Server then console will give you the crazy error that you see. console then server will not.
On MacOS Sierra, check TERM in Terminal.app
$ echo $TERM
xterm-256color
$ bin/spring stop
$ bin/rails c
No entry for terminal type "local/var/ry/rubies";
using dumb terminal settings.
irb> exit
$ bin/rails c
Cannot read termcap database;
using dumb terminal settings.
You can change TERM via Terminal > Preference > Profiles > Advanced > Terminfo > Declare terminal as: xterm.
Open new Terminal.
$ echo $TERM
xterm
$ bin/rails c
irb>
All sweet no warnings.
Now I leave it to someone with greater knowledge to explain why.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With