Comments (21)
That might be possible, in theory, but the question I'm yet to find an answer for is, how do you track which inf-ruby buffer corresponds to each ruby-mode buffer?
@dgutov can't we have a plist of project directories and inf-ruby buffer names? The projects directory would have to be taken by calling projectile-project-root
so this feature would have a dependency on projectile. Although this does not resolve the case of the gem sources.
from robe.
When I run 'robe-rails-refresh' I get:
How did you start the inf-ruby process? Was it with inf-ruby-console-auto
, like the README suggests?
Also, when I open emacs shell and type bundle exec rails console and then MyModel.new` I receive
This is not relevant, but you can (setenv "PAGER" "cat")
in your init file to disable paging.
from robe.
Looks like it was some kind of issue with pry
. I just made a complete cleanup of my ~/.rbenv/
directory and installed all gems again.
Thank you for the attention =)
from robe.
I don't see how it could be an issue with pry
.
from robe.
I got this same issue now.
head :005 > E, [2015-02-24T09:31:34.598727 #4893] ERROR -- : Request failed: /rails_refresh/. Please file an issue.
E, [2015-02-24T09:31:34.598779 #4893] ERROR -- : uninitialized constant Robe::Sash::ActionDispatch
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/sash.rb:165:in `rails_refresh'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/sash.rb:176:in `public_send'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/sash.rb:176:in `call'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/server.rb:40:in `block in start'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/server.rb:28:in `loop'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe/server.rb:28:in `start'
/home/stardiviner/.emacs.d/el-get/robe-mode/lib/robe.rb:18:in `block in start'
from robe.
@stardiviner Do you use Rails? What does (inf-ruby-console-rails-p)
return?
from robe.
...if you run it in the application root.
from robe.
I get t
when run command (inf-ruby-console-rails-p)
in Rails app root.
And I get nil
when run command (inf-ruby-console-rails-p)
not in Rails app root.
from robe.
@dgutov Do you have any update on this issue?
from robe.
@stardiviner No progress. How do I reproduce it?
If you create a new Rails project, do you see the problem there as well?
from robe.
@dgutov yes, see the problem in a new Rails project.
Rails version: Rails 4.2.1
Ruby version: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
Emacs version: GNU Emacs 25.0.50.1
irb version: irb 0.9.6(09/06/30)
Bunder version 1.9.8
I don't know how to let your reproduce the issue again.
from robe.
Works for me, with Ruby 2.2.0 and Rails 4.2.1 as well. Same Emacs and irb
, Bundler 1.9.4 or 1.9.9.
You should write step-by-step how you get to the error. The exact way you create a new project (is it rails new ...
followed by bundle install
?), and what steps you perform after launching Emacs.
from robe.
error
I know why have this error now:
I configure inf-ruby and robe-mode like this:
(with-eval-after-load 'inf-ruby
(unless (get-buffer-process "*ruby*")
(run-ruby "pry" "ruby")
))
(with-eval-after-load 'robe
(unless (get-buffer-process "*ruby*")
(run-ruby "pry" "ruby"))
(robe-start))
reproduce:
use upper config, then press [C-c C-k]
in rails ruby code file to refresh rails code.
reason
because inf-ruby does not support multiple instances, user can't start inf-ruby-console-auto for general ruby code file, then start a new inf-ruby instance for Rails project.
I want to ask. Is it possible to support in inf-ruby or robe-mode?
- let inf-ruby open process bufffer for separate projects.
- or let robe-use always use single inf-ruby for all.
from robe.
I configure inf-ruby and robe-mode like this:
Well, then is was a waste of my time. Just don't do that, the amount of effort you save is negligible.
let inf-ruby open process bufffer for separate projects
That might be possible, in theory, but the question I'm yet to find an answer for is, how do you track which inf-ruby buffer corresponds to each ruby-mode buffer? We'll need to interact with them from different Ruby buffers, including ones outside of project directories (like in gem sources).
Feel free to open a new issue, here or in inf-ruby.
from robe.
This is a solution, and I think is a good idea.
from robe.
The projects directory would have to be taken by calling projectile-project-root
No need for projectile, it will probably be the value of default-directory
in the respective inf-ruby
buffer. And the file-in-directory-p
check should suffice. The gem issue is more complicated.
Anyway, as long as we're using inf-ruby, the next step will be to support multiple REPLs there.
from robe.
the next step will be to support multiple REPLs there.
I made a PR that addresses that nonsequitur/inf-ruby#91
from robe.
I've pushed support for multiple projects to Robe, please take a look.
from robe.
@asok @stardiviner Anybody using it?
from robe.
I will take a try in recent days.
from robe.
@dgutov Sorry, I can't test for recent days,My rails new project failed on some problem.
from robe.
Related Issues (20)
- Cannot load such file pry HOT 2
- Is there a way to show docs in completions popup/eldoc summary? HOT 1
- Autocompletion not working? HOT 1
- Stuck at cpu 100% HOT 6
- Robe cannot autostart: "No matching directory found" HOT 4
- Robe not working on Ruby 2.7.1 HOT 3
- robe make emacs freeze on 27 on large projects HOT 16
- Non-string path in LOAD_PATH HOT 3
- Emacs freezes when robe is called while byebug is active on console HOT 3
- How to disable robe? HOT 2
- Get search failed message when run robe-jump. HOT 19
- `Can't find the location` when try to search a class defined on current project. (but can in irb) HOT 6
- `find-tag-marker-ring` breaks `robe-jump` on Emacs 28. HOT 2
- Environment variables HOT 1
- Can't jump to the nested module's class in `enh-ruby-mode`, but ruby-mode works HOT 29
- robe-jump returns error file doesnt exists - but it exists HOT 11
- [Help Request] Not robe issue, just need some professional help on crystal-mode. HOT 10
- CPU spikes during rails process buffer completion HOT 7
- Allow for configurable specificity of `robe-jump` entries HOT 9
- Should be possible to change Robe errors buffer from inf-ruby buffer to another buffer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robe.