greyblake / vim-preview

Vim plugin for previewing markup files(markdown,rdoc,textile,html)
GNU General Public License v2.0
209 stars 29 forks source link

Error detected while processing function <SNR>54_Preview..preview#show #26

Closed bytesource closed 10 years ago

bytesource commented 12 years ago

I get the following error when pressing LeaderP:

Error detected while processing function <SNR>54_Preview..preview#show..<SNR>83_init..<SNR>83_load:
line  244:
LoadError: (eval):7:in `require': no such file to load -- rubygems
Error detected while processing function <SNR>54_Preview..preview#show:
line    4:
NameError: (eval):7: uninitialized constant Preview 

After updating the plugin the error message still comes up.

Stefan

greyblake commented 12 years ago

Thanks for the reporting. Please install rubygems package. For example, if you're using Debian/Ubuntu you can do it with command

apt-get install rubygems

After that make sure you installed necessary gem to process appropriate format (the plugin will point you to what you should install exactly).

You're not the first who reports this kind of issue, so I'll keep it open until I fix the plugin to display a message for user to install rubygems package.

Thanks. Sergey.

bytesource commented 12 years ago

Thanks for your reply.

I first installed rubygems

$ sudo apt-get install rubygems

and then bluecloth

$ gem install bluecloth

Unfortunately, now when I press LeaderP, the message Preview is shown for a second before Vim shuts down. I tried with several README.md files, but Vim always crashes.

Do you have an idea what I might have done wrong?

Stefan

greyblake commented 12 years ago

Have no ideas. Can you please provide information about your environment(OS, ruby version, version of Vim, etc) so I can reproduce the error?

Thanks. Sergey.

bytesource commented 12 years ago

Here is some information about the enviromnment.

Kubuntu 11.10

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 6 2011 10:34:05) Included patches: 1-154

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

Hope this helps.

greyblake commented 12 years ago

Thanks. I'll try it on virtual box.

greyblake commented 12 years ago

So does your Vim just crashes? I can't reproduce this. Please see which version of ruby uses your Vim (it can be different than default in your system). Type in Vim: :ruby puts RUBY_VERSION

Also.. I remember there was a bug with ruby 1.9 in Vim. Ruby 1.9. wasn't able to perform any kind of fork, but it seems to be fixed know.

Try to do something like this: :ruby system "pwd" . (system implicitly forks a process) If this will not crash you Vim, then it's something different.

bytesource commented 12 years ago

You are right, the Ruby version Vim depends upon is different from the one I am using. :ruby puts RUBY_VERSION returns 1.8.7.

As for :ruby system "pwd", this command does not crash my Vim.

greyblake commented 12 years ago

Hm.. Have no more ideas. Does Vim provide some output when it crashes?

bytesource commented 12 years ago

"Does Vim provide some output when it crashes?"

No, unfortunately it does not.

greyblake commented 12 years ago

Seems today I got similar issue when I switched to ruby1.9 with RVM.

Could you please try the next:

bytesource commented 12 years ago

I just did the following:

Close all open Vim windows.

$ rvm use ruby-1.8.7-p334
Using /home/sovonex/.rvm/gems/ruby-1.8.7-p334
$ gem install bluecloth
Fetching: bluecloth-2.2.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed bluecloth-2.2.0

Open markdown document with Vim, press LeaderP:

Vim crashes

Unfortunately is does not seem to work.

greyblake commented 12 years ago

Thanks for trying.

ilyakatz commented 10 years ago

not sure if it makes a different anymore, but I have the same problem on Chrubuntu 12.04

ilyakatz commented 10 years ago

@bytesource I came across another plugin which so crashes and there is an explanation that it may happen duty to ruby version incompatibility

https://github.com/matthias-guenther/hammer.vim

bytesource commented 10 years ago

@ilyakatz Thanks for pointing me to this possible source of error.

greyblake commented 10 years ago

@ilyakatz Thanks for the info!

So I'm closing this issue.