-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems installing import-js with gem for Sublime Text #96
Comments
|
Thanks, but now i`m getting other error
Before this, there was another error saying the import-js couldn't be found in I also put the sublime files that I found on this repository on the import-js`s folder then sublime text started recognizing it as a package. |
Thanks for trying out import-js @vini175pa! I've made some changes in the 0.2.1 release that will hopefully resolve your issues:
You shouldn't have to copy any files (I've updated the docs so that they don't mention that anymore). So start by making sure you don't have any copied files. Then re-install |
Reopening for a while so that this issue is more discoverable (I suspect others are running into the same issues). |
Edited I renamed the
|
I wonder if this is because you installed the gem using It's confusing that the plugin has different names in different places. The canonical name is "import-js", but gems are to be named with underscores instead of dashes, so that's why you install the |
Thanks, finally I solved it. I followed these instructions http://stackoverflow.com/questions/18541695/installed-ruby-using-apt-get-install-ruby-2-0-0-succeeded-but-not-using-correct. The i changed ImportJs.sublime-settings to the right path.
And it finally worked.. Kinda of.. EDITED I'm getting some errors though.
Edited Its not importing at the end. Fix all imports is requiring the same package everytime and when i try to 'import word unde cursor' it doesn't import, only opens a dropdown showing paths. And when you select one, it does nothing. Thanks for your help. This is a great package, i really want to use it. I will give look at the code as soon as I can. Are you already using it? If so, on which text editor? |
Great, I'm glad you solved it. Thanks for your persistence. I hope you'll find the tool useful! |
Gah, I replied before reading your edits... Do you think you can paste the contents of the js file you are using? And perhaps your .importjs.json config as well? I use the vim plugin myself. But there are three people on my team using the Sublime plugin. |
First file: test.js
After "import word under cursor" on
.importjson.json -- It should be .importjs.json
EDITED After renaming the .importjs.json solved the first problem. Now we`re almost there. I did a test here. I tried importing an model, like User (named User.js of the folder models) in a parent Directory. So the test.js was in "/test.js" and the model was "/models/User.js" . I imported it with importJs but the require was like this
It should be package.json dependencies
|
I think you are getting |
Oh, i see. Thanks for your help. It seems almost everything is working fine now. The only thing that is not. Is that when there are more than one option. Example User.js. It shows a dropdown to choose wich one I want (models/User or node_modules/.../.../user.js), but when I press enter on one of them, nothing happens. This is a great plugin, it will help me a lot! |
Are those the actual options you see in the dropdown? I'm confused by the Can you look at the Sublime console log (
after that, the file is changed with my selection added as an import. |
Also @vini175pa what version of sublime are you using? |
No no, Sorry. I should have put some like "node_modules/path/to/module". I put "..." just to give an example. That path was just an example. Trying it on "express" the options are.
This is what i see in the console log:
I'm using Sublime Text 3 Build 3083 |
Interesting. I use the same Sublime version. This is actually something I thought was going to be a problem, and I was somewhat surprised that it worked. Even though It looks like we might be able to use If you feel up for hacking a bit @vini175pa , you could try to make that change and report back if it works. Otherwise I'll look into it tomorrow. Though even if it works for me, a change like that is only going to be a guess since I probably won't be able to reproduce the bug. |
Ok, I'll try. Thanks for your help :) and for your plugin |
Solved it, I will try to solve some other problems I found. If you press ESC when the dropdown is showing the options, it will import the last option (or the first, I don't remember) anyway. EDITED I made a pull request with the changes |
I'm no Python expert either, but it's amazing how much knowledge is online these days. Thanks for all your help, I really appreciate it! |
@vini175pa if you can see any good ways to improve the documentation that would have helped you get up and running more smoothly, please suggest them or submit a PR! |
I don't think GitHub has a message feature, and I don't have much experience with server side React so I'm not sure how helpful I'll be. You'll probably have better luck on stack overflow or IRC. https://facebook.github.io/react/support.html |
Yeah, no experience with server-side here either. |
Closing this with the assumption that we've cleared out all the blockers. |
I wanted to use some keyword arguments, which is not supported in Ruby 1.9.3. We actually haven't been able to run on Ruby 1.9.3 anyway since adding the slop gem (see Galooshi#96). Additionally, this version of Ruby was EOL'd on February 23, 2015 anyway, so it should be pretty safe to stop running our tests here.
When i try to install import-js by gem it shows an error.
sudo gem install import-js
So I tried
sudo gem install import_js
How can I solve this? I really want to use this :)
The text was updated successfully, but these errors were encountered: