I am trying to generate a spool file through below anonymous block in order to find out views on a particualar table.

cursor c1 is select view_name,text from users_view;
rt c1%rowtype;
open c1;
fetch c1 into rt;
exit when c1%notfound;
dbms_output.put_line(rt.view_name || '|' || rt.text);
end loop;

When I run it I get an error as "numeric or value errors", however if I remove text(LONG) column from cursor defination the block goes through without any error.

I understand that we can not use LONG data type in a where clause but is it that it can't be fetched in a cursor as well? If yes, what can be the alternative in this case?

LONG types (blobs basically) usually have to be fetched separately. What is stored in the table is a link to the actual data, which may be in an external file. Read the Oracle documentation on how to do that. I haven't done this for almost 10 years so that's as much as I can tell you without excessive time spent doing what you need to do yourself... :-)